From: Devang Patel Date: Wed, 11 Aug 2010 23:17:54 +0000 (+0000) Subject: Even if a variable has constant value all the time, it is still a variable in gdb... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=ebd53742c6ce51edb46dfd0a477c03d7770a1818;p=oota-llvm.git 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 --- 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),