From ebd53742c6ce51edb46dfd0a477c03d7770a1818 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Wed, 11 Aug 2010 23:17:54 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110876 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/DebugInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp index cf2c2777e7d..1b9008cca72 100644 --- a/lib/Analysis/DebugInfo.cpp +++ b/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),