From 3dc08ebb5f8858e5e23b12bbbb817f840717cccd Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 14 Jan 2004 17:07:46 +0000 Subject: Use new method llvm-svn: 10852 --- llvm/lib/Debugger/ProgramInfo.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/Debugger/ProgramInfo.cpp') diff --git a/llvm/lib/Debugger/ProgramInfo.cpp b/llvm/lib/Debugger/ProgramInfo.cpp index 46584a942c9..29195bd159e 100644 --- a/llvm/lib/Debugger/ProgramInfo.cpp +++ b/llvm/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... -- cgit v1.2.3