mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
PR14606: debug info imported_module support
Adding another CU-wide list, in this case of imported_modules (since they should be relatively rare, it seemed better to add a list where each element had a "context" value, rather than add a (usually empty) list to every scope). This takes care of DW_TAG_imported_module, but to fully address PR14606 we'll need to expand this to cover DW_TAG_imported_declaration too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179836 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -125,6 +125,7 @@ namespace llvm {
|
||||
bool isTemplateTypeParameter() const;
|
||||
bool isTemplateValueParameter() const;
|
||||
bool isObjCProperty() const;
|
||||
bool isImportedModule() const;
|
||||
|
||||
/// print - print descriptor.
|
||||
void print(raw_ostream &OS) const;
|
||||
@@ -199,8 +200,9 @@ namespace llvm {
|
||||
DIArray getRetainedTypes() const;
|
||||
DIArray getSubprograms() const;
|
||||
DIArray getGlobalVariables() const;
|
||||
DIArray getImportedModules() const;
|
||||
|
||||
StringRef getSplitDebugFilename() const { return getStringField(11); }
|
||||
StringRef getSplitDebugFilename() const { return getStringField(12); }
|
||||
|
||||
/// Verify - Verify that a compile unit is well formed.
|
||||
bool Verify() const;
|
||||
@@ -678,6 +680,18 @@ namespace llvm {
|
||||
bool Verify() const;
|
||||
};
|
||||
|
||||
/// \brief An imported module (C++ using directive or similar).
|
||||
class DIImportedModule : public DIDescriptor {
|
||||
friend class DIDescriptor;
|
||||
void printInternal(raw_ostream &OS) const;
|
||||
public:
|
||||
explicit DIImportedModule(const MDNode *N) : DIDescriptor(N) { }
|
||||
DIScope getContext() const { return getFieldAs<DIScope>(1); }
|
||||
DINameSpace getNameSpace() const { return getFieldAs<DINameSpace>(2); }
|
||||
unsigned getLineNumber() const { return getUnsignedField(3); }
|
||||
bool Verify() const;
|
||||
};
|
||||
|
||||
/// getDISubprogram - Find subprogram that is enclosing this scope.
|
||||
DISubprogram getDISubprogram(const MDNode *Scope);
|
||||
|
||||
|
Reference in New Issue
Block a user