From 20d9e41ddb3f531267680819b5cac4cac1c6b231 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Tue, 7 May 2013 21:35:53 +0000 Subject: 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 --- include/llvm/DIBuilder.h | 13 +++++++++++-- include/llvm/DebugInfo.h | 10 +++++----- 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/llvm/DIBuilder.h b/include/llvm/DIBuilder.h index 2c0f712..4ce884b 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 f9b58f4..1c7edc9 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(1); } - DINameSpace getNameSpace() const { return getFieldAs(2); } + DIDescriptor getEntity() const { return getFieldAs(2); } unsigned getLineNumber() const { return getUnsignedField(3); } bool Verify() const; }; -- cgit v1.1