summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-05-07 21:35:53 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-05-07 21:35:53 +0000
commit20d9e41ddb3f531267680819b5cac4cac1c6b231 (patch)
tree876162a4fa808369b673daf5be737c98476679bd /include
parent8cb6b971601d42a27e40f0f1d4828671441989f5 (diff)
downloadllvm-20d9e41ddb3f531267680819b5cac4cac1c6b231.tar.gz
llvm-20d9e41ddb3f531267680819b5cac4cac1c6b231.tar.bz2
llvm-20d9e41ddb3f531267680819b5cac4cac1c6b231.tar.xz
Rename DIImportedModule to DIImportedEntity and allow imported declarations
DIBuilder::createImportedDeclaration isn't fully plumbed through (note, lacking in AsmPrinter/DwarfDebug support) but this seemed like a sufficiently useful division of code to make the subsequent patch(es) easier to follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181364 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/DIBuilder.h13
-rw-r--r--include/llvm/DebugInfo.h10
2 files changed, 16 insertions, 7 deletions
diff --git a/include/llvm/DIBuilder.h b/include/llvm/DIBuilder.h
index 2c0f712a93..4ce884b736 100644
--- a/include/llvm/DIBuilder.h
+++ b/include/llvm/DIBuilder.h
@@ -37,7 +37,7 @@ namespace llvm {
class DIType;
class DIArray;
class DIGlobalVariable;
- class DIImportedModule;
+ class DIImportedEntity;
class DINameSpace;
class DIVariable;
class DISubrange;
@@ -577,9 +577,18 @@ namespace llvm {
/// @param Context The scope this module is imported into
/// @param NS The namespace being imported here
/// @param Line Line number
- DIImportedModule createImportedModule(DIScope Context, DINameSpace NS,
+ DIImportedEntity createImportedModule(DIScope Context, DINameSpace NS,
unsigned Line);
+ /// \brief Create a descriptor for an imported function.
+ /// @param Context The scope this module is imported into
+ /// @param Decl The declaration (or definition) of a function, type, or
+ /// variable
+ /// @param Line Line number
+ DIImportedEntity createImportedDeclaration(DIScope Context,
+ DIDescriptor Decl,
+ unsigned Line);
+
/// insertDeclare - Insert a new llvm.dbg.declare intrinsic call.
/// @param Storage llvm::Value of the variable
/// @param VarInfo Variable's debug info descriptor.
diff --git a/include/llvm/DebugInfo.h b/include/llvm/DebugInfo.h
index f9b58f4770..1c7edc971b 100644
--- a/include/llvm/DebugInfo.h
+++ b/include/llvm/DebugInfo.h
@@ -125,7 +125,7 @@ namespace llvm {
bool isTemplateTypeParameter() const;
bool isTemplateValueParameter() const;
bool isObjCProperty() const;
- bool isImportedModule() const;
+ bool isImportedEntity() const;
/// print - print descriptor.
void print(raw_ostream &OS) const;
@@ -200,7 +200,7 @@ namespace llvm {
DIArray getRetainedTypes() const;
DIArray getSubprograms() const;
DIArray getGlobalVariables() const;
- DIArray getImportedModules() const;
+ DIArray getImportedEntities() const;
StringRef getSplitDebugFilename() const { return getStringField(12); }
@@ -684,13 +684,13 @@ namespace llvm {
};
/// \brief An imported module (C++ using directive or similar).
- class DIImportedModule : public DIDescriptor {
+ class DIImportedEntity : public DIDescriptor {
friend class DIDescriptor;
void printInternal(raw_ostream &OS) const;
public:
- explicit DIImportedModule(const MDNode *N) : DIDescriptor(N) { }
+ explicit DIImportedEntity(const MDNode *N) : DIDescriptor(N) { }
DIScope getContext() const { return getFieldAs<DIScope>(1); }
- DINameSpace getNameSpace() const { return getFieldAs<DINameSpace>(2); }
+ DIDescriptor getEntity() const { return getFieldAs<DIDescriptor>(2); }
unsigned getLineNumber() const { return getUnsignedField(3); }
bool Verify() const;
};