diff options
author | Devang Patel <dpatel@apple.com> | 2010-08-10 07:11:13 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-08-10 07:11:13 +0000 |
commit | 293680756404020a4888860db9f34728c9cecd1f (patch) | |
tree | 1f6a3a580c2e897c4920eb657e176e0f0935fd4d /lib/Analysis/DebugInfo.cpp | |
parent | c9aed19747608b7688a64f2f382a008889f8e57d (diff) |
Handle TAG_constant for integers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110656 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DebugInfo.cpp')
-rw-r--r-- | lib/Analysis/DebugInfo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp index 3d03815974..337dc3fc3d 100644 --- a/lib/Analysis/DebugInfo.cpp +++ b/lib/Analysis/DebugInfo.cpp @@ -186,7 +186,8 @@ bool DIDescriptor::isSubprogram() const { /// isGlobalVariable - Return true if the specified tag is legal for /// DIGlobalVariable. bool DIDescriptor::isGlobalVariable() const { - return DbgNode && getTag() == dwarf::DW_TAG_variable; + return DbgNode && (getTag() == dwarf::DW_TAG_variable || + getTag() == dwarf::DW_TAG_constant); } /// isGlobal - Return true if the specified tag is legal for DIGlobal. @@ -1078,7 +1079,7 @@ DIFactory::CreateGlobalVariable(DIDescriptor Context, StringRef Name, unsigned LineNo, DIType Ty,bool isLocalToUnit, bool isDefinition, llvm::Constant *Val) { Value *Elts[] = { - GetTagConstant(dwarf::DW_TAG_variable), + GetTagConstant(dwarf::DW_TAG_constant), llvm::Constant::getNullValue(Type::getInt32Ty(VMContext)), Context, MDString::get(VMContext, Name), |