[llvm-commits] CVS: llvm/lib/Debugger/ProgramInfo.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Jan 14 11:08:01 PST 2004


Changes in directory llvm/lib/Debugger:

ProgramInfo.cpp updated: 1.1 -> 1.2

---
Log message:

Use new method


---
Diffs of the changes:  (+1 -2)

Index: llvm/lib/Debugger/ProgramInfo.cpp
diff -u llvm/lib/Debugger/ProgramInfo.cpp:1.1 llvm/lib/Debugger/ProgramInfo.cpp:1.2
--- llvm/lib/Debugger/ProgramInfo.cpp:1.1	Sun Jan  4 23:25:10 2004
+++ llvm/lib/Debugger/ProgramInfo.cpp	Wed Jan 14 11:07:46 2004
@@ -44,8 +44,7 @@
   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...





More information about the llvm-commits mailing list