aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/DebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-08-10 07:11:13 +0000
committerDevang Patel <dpatel@apple.com>2010-08-10 07:11:13 +0000
commit293680756404020a4888860db9f34728c9cecd1f (patch)
tree1f6a3a580c2e897c4920eb657e176e0f0935fd4d /lib/Analysis/DebugInfo.cpp
parentc9aed19747608b7688a64f2f382a008889f8e57d (diff)
downloadexternal_llvm-293680756404020a4888860db9f34728c9cecd1f.zip
external_llvm-293680756404020a4888860db9f34728c9cecd1f.tar.gz
external_llvm-293680756404020a4888860db9f34728c9cecd1f.tar.bz2
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.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index 3d03815..337dc3f 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),