diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-02-02 00:34:16 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-02-02 00:34:16 +0000 |
commit | 1513eb9284c23acfd19cf742b95996fbb11ca741 (patch) | |
tree | 7840b8d0b6fe4486d7ad87cc80903912350c3440 /lib/CodeGen/CGDebugInfo.cpp | |
parent | 453cb859a3c8dcafe79ae840dfc35ff8eae1b4b3 (diff) |
Basics
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174246 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 5e60bd8f66..6d61c52af5 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -111,6 +111,9 @@ llvm::DIDescriptor CGDebugInfo::getContextDescriptor(const Decl *Context) { return llvm::DIDescriptor(Ty); } } + + if (!LexicalBlockStack.empty()) + return llvm::DIDescriptor(LexicalBlockStack.back()); return TheCU; } @@ -2822,6 +2825,12 @@ void CGDebugInfo::EmitGlobalVariable(const ValueDecl *VD, getStaticDataMemberDeclaration(VD)); } +void CGDebugInfo::EmitUsingDirectiveDecl(const UsingDirectiveDecl &UD) { + SourceLocation Loc = UD.getNamespaceKeyLocation(); + llvm::DIFile Unit = getOrCreateFile(Loc); + DBuilder.createUsingDirective(getContextDescriptor(&UD), Unit, getLineNumber(Loc), getOrCreateNameSpace(UD.getNominatedNamespace())); +} + /// getOrCreateNamesSpace - Return namespace descriptor for the given /// namespace decl. llvm::DINameSpace |