Revert "Revert "PR14606: debug info imported_module support""

This reverts commit r179840 with a fix to test/DebugInfo/two-cus-from-same-file.ll

I'm not sure why that test only failed on ARM & MIPS and not X86 Linux, even
though the debug info was clearly invalid on all of them, but this ought to fix
it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179996 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2013-04-22 06:12:31 +00:00
parent 80a1caa5cb
commit c462db6d66
91 changed files with 225 additions and 105 deletions

View File

@ -37,11 +37,13 @@ namespace llvm {
class DIType;
class DIArray;
class DIGlobalVariable;
class DIImportedModule;
class DINameSpace;
class DIVariable;
class DISubrange;
class DILexicalBlockFile;
class DILexicalBlock;
class DIScope;
class DISubprogram;
class DITemplateTypeParameter;
class DITemplateValueParameter;
@ -57,6 +59,7 @@ namespace llvm {
MDNode *TempRetainTypes;
MDNode *TempSubprograms;
MDNode *TempGVs;
MDNode *TempImportedModules;
Function *DeclareFn; // llvm.dbg.declare
Function *ValueFn; // llvm.dbg.value
@ -65,6 +68,7 @@ namespace llvm {
SmallVector<Value *, 4> AllRetainTypes;
SmallVector<Value *, 4> AllSubprograms;
SmallVector<Value *, 4> AllGVs;
SmallVector<Value *, 4> AllImportedModules;
DIBuilder(const DIBuilder &) LLVM_DELETED_FUNCTION;
void operator=(const DIBuilder &) LLVM_DELETED_FUNCTION;
@ -569,6 +573,13 @@ namespace llvm {
DILexicalBlock createLexicalBlock(DIDescriptor Scope, DIFile File,
unsigned Line, unsigned Col);
/// \brief Create a descriptor for an imported module.
/// @param Context The scope this module is imported into
/// @param NS The namespace being imported here
/// @param LineNumber Line number
DIImportedModule createImportedModule(DIScope Context, DINameSpace NS,
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.