aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Debugger/ProgramInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-01-14 17:07:46 +0000
committerChris Lattner <sabre@nondot.org>2004-01-14 17:07:46 +0000
commit3dc08ebb5f8858e5e23b12bbbb817f840717cccd (patch)
tree7647f23679c54106c7bd6d183b23a106a90639ce /llvm/lib/Debugger/ProgramInfo.cpp
parente8dfccaabd7d9862f3e0bd84915a7fa4fc30e35d (diff)
downloadllvm-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.cpp3
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...