diff options
author | Chris Lattner <sabre@nondot.org> | 2004-01-14 17:07:46 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-01-14 17:07:46 +0000 |
commit | 3dc08ebb5f8858e5e23b12bbbb817f840717cccd (patch) | |
tree | 7647f23679c54106c7bd6d183b23a106a90639ce /llvm/lib/Debugger/ProgramInfo.cpp | |
parent | e8dfccaabd7d9862f3e0bd84915a7fa4fc30e35d (diff) | |
download | llvm-3dc08ebb5f8858e5e23b12bbbb817f840717cccd.zip llvm-3dc08ebb5f8858e5e23b12bbbb817f840717cccd.tar.gz llvm-3dc08ebb5f8858e5e23b12bbbb817f840717cccd.tar.bz2 |
Use new method
llvm-svn: 10852
Diffstat (limited to 'llvm/lib/Debugger/ProgramInfo.cpp')
-rw-r--r-- | llvm/lib/Debugger/ProgramInfo.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Debugger/ProgramInfo.cpp b/llvm/lib/Debugger/ProgramInfo.cpp index 46584a9..29195bd 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<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... |