Use new method
authorChris Lattner <sabre@nondot.org>
Wed, 14 Jan 2004 17:07:46 +0000 (17:07 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 14 Jan 2004 17:07:46 +0000 (17:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10852 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Debugger/ProgramInfo.cpp

index 46584a942c9c8e5ad4de2815ebd1641e1d75471a..29195bd159e8a7bcf5c8d56a43e1da4b6a922377 100644 (file)
@@ -44,8 +44,7 @@ static std::string getStringValue(Value *V, unsigned Offset = 0) {
   if (GlobalVariable *GV = dyn_cast<GlobalVariable>(V)) {
     if (GV->hasInitializer() && isa<ConstantArray>(GV->getInitializer())) {
       ConstantArray *Init = cast<ConstantArray>(GV->getInitializer());
-      if (Init->getType()->getElementType() == Type::SByteTy ||
-          Init->getType()->getElementType() == Type::UByteTy) {
+      if (Init->isString()) {
         std::string Result = Init->getAsString();
         if (Offset < Result.size()) {
           // If we are pointing INTO The string, erase the beginning...