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
This commit is contained in:
Devang Patel 2010-08-11 23:17:54 +00:00
parent eaf1c98a7c
commit ebd53742c6

View File

@ -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),