aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Debugger
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
commite3f84f53cac6e00c1eb819d9a1bba09037bcf7f7 (patch)
treecbacedcf9c89b0a3a40dcb1966cc0bd7d03eb706 /lib/Debugger
parent13cfdea1ef74147a1861a7eae50249003f8c7929 (diff)
downloadexternal_llvm-e3f84f53cac6e00c1eb819d9a1bba09037bcf7f7.zip
external_llvm-e3f84f53cac6e00c1eb819d9a1bba09037bcf7f7.tar.gz
external_llvm-e3f84f53cac6e00c1eb819d9a1bba09037bcf7f7.tar.bz2
Use new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10852 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Debugger')
-rw-r--r--lib/Debugger/ProgramInfo.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Debugger/ProgramInfo.cpp b/lib/Debugger/ProgramInfo.cpp
index 46584a9..29195bd 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<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...