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 | b0b645cad157a6ee505084fcee9086c43f960fe0 (patch) | |
tree | 3b800c23f5db74b93263a0713f97d395684241e4 /clang/lib/CodeGen/CGDebugInfo.h | |
parent | 3b6038b6f3822ef2f6b0c5af007709b61e1e2f4a (diff) | |
download | bcm5719-llvm-b0b645cad157a6ee505084fcee9086c43f960fe0.tar.gz bcm5719-llvm-b0b645cad157a6ee505084fcee9086c43f960fe0.zip |
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).
llvm-svn: 181393
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.h')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h index 4080492a1c6..e61a50eeb41 100644 --- a/clang/lib/CodeGen/CGDebugInfo.h +++ b/clang/lib/CodeGen/CGDebugInfo.h @@ -35,6 +35,7 @@ namespace clang { class ObjCIvarDecl; class ClassTemplateSpecializationDecl; class GlobalDecl; + class UsingDecl; namespace CodeGen { class CodeGenModule; @@ -94,6 +95,7 @@ class CGDebugInfo { llvm::DenseMap<const char *, llvm::WeakVH> DIFileCache; llvm::DenseMap<const FunctionDecl *, llvm::WeakVH> SPCache; + llvm::DenseMap<const Decl *, llvm::WeakVH> DeclCache; llvm::DenseMap<const NamespaceDecl *, llvm::WeakVH> NameSpaceCache; llvm::DenseMap<const Decl *, llvm::WeakVH> StaticDataMemberCache; @@ -265,6 +267,9 @@ public: /// \brief - Emit C++ using directive. void EmitUsingDirective(const UsingDirectiveDecl &UD); + /// \brief - Emit C++ using declaration. + void EmitUsingDecl(const UsingDecl &UD); + /// getOrCreateRecordType - Emit record type's standalone debug info. llvm::DIType getOrCreateRecordType(QualType Ty, SourceLocation L); @@ -286,6 +291,8 @@ private: /// getContextDescriptor - Get context info for the decl. llvm::DIScope getContextDescriptor(const Decl *Decl); + llvm::DIScope getCurrentContextDescriptor(const Decl *Decl); + /// createRecordFwdDecl - Create a forward decl for a RecordType in a given /// context. llvm::DIType createRecordFwdDecl(const RecordDecl *, llvm::DIDescriptor); @@ -329,6 +336,10 @@ private: llvm::DIType CreateMemberType(llvm::DIFile Unit, QualType FType, StringRef Name, uint64_t *Offset); + /// \brief Retrieve the DIDescriptor, if any, for the canonical form of this + /// declaration. + llvm::DIDescriptor getDeclarationOrDefinition(const Decl *D); + /// getFunctionDeclaration - Return debug info descriptor to describe method /// declaration for the given method definition. llvm::DISubprogram getFunctionDeclaration(const Decl *D); |