diff options
| author | David Blaikie <dblaikie@gmail.com> | 2013-05-08 06:01:46 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2013-05-08 06:01:46 +0000 |
| commit | 3923d6a87fe7b2c91cc4a7dbd90c4ec7e2316bcd (patch) | |
| tree | 803770bb2d6959a02ac087d3c2c0147a3f8f2d34 /lib/CodeGen/CGDecl.cpp | |
| parent | 70133b5b4ad863f7d73fabfaf799b2f4e30d98ec (diff) | |
| download | clang-3923d6a87fe7b2c91cc4a7dbd90c4ec7e2316bcd.tar.gz clang-3923d6a87fe7b2c91cc4a7dbd90c4ec7e2316bcd.tar.bz2 clang-3923d6a87fe7b2c91cc4a7dbd90c4ec7e2316bcd.tar.xz | |
Debug Info: Using declarations/DW_TAG_imported_declaration of variables, types, and functions.
Basic support is implemented here - it still doesn't account for
declared-but-not-defined variables or functions. It cannot handle out of
order (declared, 'using', then defined) cases for variables, but can
handle that for functions (& can handle declared, 'using'd, and not
defined at all cases for types).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181393 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
| -rw-r--r-- | lib/CodeGen/CGDecl.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp index 3ce6dec6a5..41f8409189 100644 --- a/lib/CodeGen/CGDecl.cpp +++ b/lib/CodeGen/CGDecl.cpp @@ -72,14 +72,13 @@ void CodeGenFunction::EmitDecl(const Decl &D) { case Decl::Block: case Decl::Captured: case Decl::ClassScopeFunctionSpecialization: + case Decl::UsingShadow: llvm_unreachable("Declaration should not be in declstmts!"); case Decl::Function: // void X(); case Decl::Record: // struct/union/class X; case Decl::Enum: // enum X; case Decl::EnumConstant: // enum ? { X = ? } case Decl::CXXRecord: // struct/union/class X; [C++] - case Decl::Using: // using X; [C++] - case Decl::UsingShadow: case Decl::NamespaceAlias: case Decl::StaticAssert: // static_assert(X, ""); [C++0x] case Decl::Label: // __label__ x; @@ -89,6 +88,10 @@ void CodeGenFunction::EmitDecl(const Decl &D) { // None of these decls require codegen support. return; + case Decl::Using: // using X; [C++] + if (CGDebugInfo *DI = getDebugInfo()) + DI->EmitUsingDecl(cast<UsingDecl>(D)); + return; case Decl::UsingDirective: // using namespace X; [C++] if (CGDebugInfo *DI = getDebugInfo()) DI->EmitUsingDirective(cast<UsingDirectiveDecl>(D)); |
