From: Chris Lattner Date: Wed, 14 Jan 2004 17:07:46 +0000 (+0000) Subject: Use new method X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e3f84f53cac6e00c1eb819d9a1bba09037bcf7f7;p=oota-llvm.git Use new method git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10852 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Debugger/ProgramInfo.cpp b/lib/Debugger/ProgramInfo.cpp index 46584a942c9..29195bd159e 100644 --- a/lib/Debugger/ProgramInfo.cpp +++ b/lib/Debugger/ProgramInfo.cpp @@ -44,8 +44,7 @@ static std::string getStringValue(Value *V, unsigned Offset = 0) { if (GlobalVariable *GV = dyn_cast(V)) { if (GV->hasInitializer() && isa(GV->getInitializer())) { ConstantArray *Init = cast(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...