summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-04-05 03:39:29 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-04-05 03:39:29 +0000
commit98db356cc18e142edc3236cc7da7675209d1403d (patch)
tree051dd1962d7f3a4f39d0264dc665defc44d7856b /clang/lib/CodeGen/CGDebugInfo.cpp
parent7088e3470c12ffc67958f25068bd989f2d0a616b (diff)
downloadbcm5719-llvm-98db356cc18e142edc3236cc7da7675209d1403d.tar.gz
bcm5719-llvm-98db356cc18e142edc3236cc7da7675209d1403d.zip
Revert "DebugInfo: Place global constants in their appropriate context."
This reverts commit r205655. Breaks the compiler-rt build with an assertion failure in LLVM... reverting while I investigate. llvm-svn: 205664
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index eed2f3c6155..41f1ddb697c 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -3230,11 +3230,8 @@ void CGDebugInfo::EmitGlobalVariable(const ValueDecl *VD,
// Do not emit separate definitions for function local const/statics.
if (isa<FunctionDecl>(VD->getDeclContext()))
return;
- llvm::DIDescriptor DContext =
- getContextDescriptor(dyn_cast<Decl>(VD->getDeclContext()));
llvm::DIGlobalVariable GV = DBuilder.createStaticVariable(
- DContext, Name, StringRef(), Unit, getLineNumber(VD->getLocation()), Ty,
- true, Init,
+ Unit, Name, Name, Unit, getLineNumber(VD->getLocation()), Ty, true, Init,
getOrCreateStaticDataMemberDeclarationOrNull(cast<VarDecl>(VD)));
DeclCache.insert(std::make_pair(VD->getCanonicalDecl(), llvm::WeakVH(GV)));
}
OpenPOWER on IntegriCloud