aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/DebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-08-11 23:17:54 +0000
committerDevang Patel <dpatel@apple.com>2010-08-11 23:17:54 +0000
commit4d597e82684d462bc98f2ff934e37d3c5e38a0c9 (patch)
tree36be88f7b06fdf2b4f58bf034970f5f78dbb5ba4 /llvm/lib/Analysis/DebugInfo.cpp
parentadd513112a6bca3bcffbf460f41298d61c2bb676 (diff)
downloadllvm-4d597e82684d462bc98f2ff934e37d3c5e38a0c9.zip
llvm-4d597e82684d462bc98f2ff934e37d3c5e38a0c9.tar.gz
llvm-4d597e82684d462bc98f2ff934e37d3c5e38a0c9.tar.bz2
Even if a variable has constant value all the time, it is still a variable in gdb's eyes.
Tested by scope.exp in gdb testsuite. llvm-svn: 110876
Diffstat (limited to 'llvm/lib/Analysis/DebugInfo.cpp')
-rw-r--r--llvm/lib/Analysis/DebugInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp
index cf2c277..1b9008c 100644
--- a/llvm/lib/Analysis/DebugInfo.cpp
+++ b/llvm/lib/Analysis/DebugInfo.cpp
@@ -1093,7 +1093,7 @@ DIFactory::CreateGlobalVariable(DIDescriptor Context, StringRef Name,
unsigned LineNo, DIType Ty,bool isLocalToUnit,
bool isDefinition, llvm::Constant *Val) {
Value *Elts[] = {
- GetTagConstant(dwarf::DW_TAG_constant),
+ GetTagConstant(dwarf::DW_TAG_variable),
llvm::Constant::getNullValue(Type::getInt32Ty(VMContext)),
Context,
MDString::get(VMContext, Name),