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 | ef50169a036f3973d0f1e2ca4cb14edd0486c40e (patch) | |
tree | 147aac29ea696e9276c413cdbbb2ba1266881fcb /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | 00c69a597cd9ca62c392f8e09c2698e2740d7241 (diff) | |
download | bcm5719-llvm-ef50169a036f3973d0f1e2ca4cb14edd0486c40e.tar.gz bcm5719-llvm-ef50169a036f3973d0f1e2ca4cb14edd0486c40e.zip |
Basics
llvm-svn: 174246
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 5e60bd8f66c..6d61c52af5f 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/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 |