aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/DIBuilder.h11
-rw-r--r--include/llvm/DebugInfo.h16
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp22
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.h3
-rw-r--r--lib/IR/DIBuilder.cpp21
-rw-r--r--lib/IR/DebugInfo.cpp33
-rw-r--r--test/CodeGen/ARM/2010-08-04-StackVariable.ll2
-rw-r--r--test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll2
-rw-r--r--test/CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll2
-rw-r--r--test/CodeGen/ARM/debug-info-arg.ll2
-rw-r--r--test/CodeGen/ARM/debug-info-branch-folding.ll2
-rw-r--r--test/CodeGen/ARM/debug-info-d16-reg.ll2
-rw-r--r--test/CodeGen/ARM/debug-info-qreg.ll2
-rw-r--r--test/CodeGen/ARM/debug-info-s16-reg.ll2
-rw-r--r--test/CodeGen/ARM/debug-info-sreg2.ll2
-rw-r--r--test/CodeGen/X86/2010-05-25-DotDebugLoc.ll2
-rw-r--r--test/CodeGen/X86/2010-05-26-DotDebugLoc.ll2
-rw-r--r--test/CodeGen/X86/2010-05-28-Crash.ll2
-rw-r--r--test/CodeGen/X86/2010-08-04-StackVariable.ll2
-rw-r--r--test/CodeGen/X86/2010-11-02-DbgParameter.ll2
-rw-r--r--test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll2
-rw-r--r--test/CodeGen/X86/MachineSink-DbgValue.ll2
-rw-r--r--test/CodeGen/X86/dbg-byval-parameter.ll2
-rw-r--r--test/CodeGen/X86/dbg-const-int.ll2
-rw-r--r--test/CodeGen/X86/dbg-const.ll2
-rw-r--r--test/CodeGen/X86/dbg-i128-const.ll2
-rw-r--r--test/CodeGen/X86/dbg-merge-loc-entry.ll2
-rw-r--r--test/CodeGen/X86/dbg-prolog-end.ll2
-rw-r--r--test/CodeGen/X86/dbg-subrange.ll2
-rw-r--r--test/CodeGen/X86/dbg-value-dag-combine.ll2
-rw-r--r--test/CodeGen/X86/dbg-value-isel.ll2
-rw-r--r--test/CodeGen/X86/dbg-value-location.ll2
-rw-r--r--test/CodeGen/X86/dbg-value-range.ll2
-rw-r--r--test/DebugInfo/2010-03-19-DbgDeclare.ll2
-rw-r--r--test/DebugInfo/2010-03-24-MemberFn.ll2
-rw-r--r--test/DebugInfo/2010-04-06-NestedFnDbgInfo.ll2
-rw-r--r--test/DebugInfo/2010-04-19-FramePtr.ll2
-rw-r--r--test/DebugInfo/2010-06-29-InlinedFnLocalVar.ll2
-rw-r--r--test/DebugInfo/AArch64/dwarfdump.ll2
-rw-r--r--test/DebugInfo/AArch64/variable-loc.ll2
-rw-r--r--test/DebugInfo/X86/2010-04-13-PubType.ll2
-rw-r--r--test/DebugInfo/X86/2010-08-10-DbgConstant.ll2
-rw-r--r--test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll2
-rw-r--r--test/DebugInfo/X86/2011-12-16-BadStructRef.ll2
-rw-r--r--test/DebugInfo/X86/DW_AT_byte_size.ll2
-rw-r--r--test/DebugInfo/X86/DW_AT_location-reference.ll2
-rw-r--r--test/DebugInfo/X86/DW_AT_object_pointer.ll2
-rw-r--r--test/DebugInfo/X86/DW_AT_specification.ll2
-rw-r--r--test/DebugInfo/X86/DW_TAG_friend.ll2
-rw-r--r--test/DebugInfo/X86/aligned_stack_var.ll2
-rw-r--r--test/DebugInfo/X86/block-capture.ll2
-rw-r--r--test/DebugInfo/X86/concrete_out_of_line.ll2
-rw-r--r--test/DebugInfo/X86/dbg-value-inlined-parameter.ll2
-rw-r--r--test/DebugInfo/X86/debug-info-block-captured-self.ll2
-rw-r--r--test/DebugInfo/X86/debug-info-blocks.ll2
-rw-r--r--test/DebugInfo/X86/debug-info-static-member.ll2
-rw-r--r--test/DebugInfo/X86/elf-names.ll2
-rw-r--r--test/DebugInfo/X86/empty-and-one-elem-array.ll2
-rw-r--r--test/DebugInfo/X86/empty-array.ll2
-rw-r--r--test/DebugInfo/X86/ending-run.ll2
-rw-r--r--test/DebugInfo/X86/enum-class.ll2
-rw-r--r--test/DebugInfo/X86/enum-fwd-decl.ll2
-rw-r--r--test/DebugInfo/X86/fission-cu.ll2
-rw-r--r--test/DebugInfo/X86/line-info.ll2
-rw-r--r--test/DebugInfo/X86/linkage-name.ll2
-rw-r--r--test/DebugInfo/X86/low-pc-cu.ll2
-rw-r--r--test/DebugInfo/X86/misched-dbg-value.ll2
-rw-r--r--test/DebugInfo/X86/multiple-at-const-val.ll2
-rw-r--r--test/DebugInfo/X86/nondefault-subrange-array.ll2
-rw-r--r--test/DebugInfo/X86/objc-fwd-decl.ll2
-rw-r--r--test/DebugInfo/X86/op_deref.ll2
-rw-r--r--test/DebugInfo/X86/pointer-type-size.ll2
-rw-r--r--test/DebugInfo/X86/pr11300.ll2
-rw-r--r--test/DebugInfo/X86/pr13303.ll2
-rw-r--r--test/DebugInfo/X86/prologue-stack.ll2
-rw-r--r--test/DebugInfo/X86/rvalue-ref.ll2
-rw-r--r--test/DebugInfo/X86/stmt-list-multiple-compile-units.ll4
-rw-r--r--test/DebugInfo/X86/stringpool.ll2
-rw-r--r--test/DebugInfo/X86/struct-loc.ll2
-rw-r--r--test/DebugInfo/X86/subrange-type.ll2
-rw-r--r--test/DebugInfo/X86/subreg.ll2
-rw-r--r--test/DebugInfo/X86/union-template.ll2
-rw-r--r--test/DebugInfo/X86/vector.ll2
-rw-r--r--test/DebugInfo/array.ll2
-rw-r--r--test/DebugInfo/dwarf-public-names.ll2
-rw-r--r--test/DebugInfo/inlined-vars.ll2
-rw-r--r--test/DebugInfo/member-pointers.ll2
-rw-r--r--test/DebugInfo/namespace.ll52
-rw-r--r--test/Transforms/DeadArgElim/dbginfo.ll2
-rw-r--r--test/Transforms/GCOVProfiling/linkagename.ll2
90 files changed, 103 insertions, 223 deletions
diff --git a/include/llvm/DIBuilder.h b/include/llvm/DIBuilder.h
index 407ee70ceb..4f0aa07130 100644
--- a/include/llvm/DIBuilder.h
+++ b/include/llvm/DIBuilder.h
@@ -37,13 +37,11 @@ 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;
@@ -59,7 +57,6 @@ namespace llvm {
MDNode *TempRetainTypes;
MDNode *TempSubprograms;
MDNode *TempGVs;
- MDNode *TempImportedModules;
Function *DeclareFn; // llvm.dbg.declare
Function *ValueFn; // llvm.dbg.value
@@ -68,7 +65,6 @@ 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;
@@ -570,13 +566,6 @@ 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.
diff --git a/include/llvm/DebugInfo.h b/include/llvm/DebugInfo.h
index 3737d2aa26..15f91870a5 100644
--- a/include/llvm/DebugInfo.h
+++ b/include/llvm/DebugInfo.h
@@ -125,7 +125,6 @@ namespace llvm {
bool isTemplateTypeParameter() const;
bool isTemplateValueParameter() const;
bool isObjCProperty() const;
- bool isImportedModule() const;
/// print - print descriptor.
void print(raw_ostream &OS) const;
@@ -200,9 +199,8 @@ namespace llvm {
DIArray getRetainedTypes() const;
DIArray getSubprograms() const;
DIArray getGlobalVariables() const;
- DIArray getImportedModules() const;
- StringRef getSplitDebugFilename() const { return getStringField(12); }
+ StringRef getSplitDebugFilename() const { return getStringField(11); }
/// Verify - Verify that a compile unit is well formed.
bool Verify() const;
@@ -680,18 +678,6 @@ 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);
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index c3f475178b..762c475c8e 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -763,23 +763,6 @@ void DwarfDebug::constructSubprogramDIE(CompileUnit *TheCU,
TheCU->addGlobalName(SP.getName(), SubprogramDie);
}
-void DwarfDebug::constructImportedModuleDIE(CompileUnit *TheCU,
- const MDNode *N) {
- DIImportedModule Module(N);
- if (!Module.Verify())
- return;
- DIE *IMDie = new DIE(dwarf::DW_TAG_imported_module);
- TheCU->insertDIE(Module, IMDie);
- DIE *NSDie = TheCU->getOrCreateNameSpace(Module.getNameSpace());
- unsigned FileID = getOrCreateSourceID(Module.getContext().getFilename(),
- Module.getContext().getDirectory(),
- TheCU->getUniqueID());
- TheCU->addUInt(IMDie, dwarf::DW_AT_decl_file, 0, FileID);
- TheCU->addUInt(IMDie, dwarf::DW_AT_decl_line, 0, Module.getLineNumber());
- TheCU->addDIEEntry(IMDie, dwarf::DW_AT_import, dwarf::DW_FORM_ref4, NSDie);
- TheCU->addToContextOwner(IMDie, Module.getContext());
-}
-
// Emit all Dwarf sections that should come prior to the content. Create
// global DIEs and emit initial debug info sections. This is invoked by
// the target AsmPrinter.
@@ -813,11 +796,6 @@ void DwarfDebug::beginModule() {
DIArray RetainedTypes = CUNode.getRetainedTypes();
for (unsigned i = 0, e = RetainedTypes.getNumElements(); i != e; ++i)
CU->getOrCreateTypeDIE(RetainedTypes.getElement(i));
- // Emit imported_modules last so that the relevant context is already
- // available.
- DIArray ImportedModules = CUNode.getImportedModules();
- for (unsigned i = 0, e = ImportedModules.getNumElements(); i != e; ++i)
- constructImportedModuleDIE(CU, ImportedModules.getElement(i));
// If we're splitting the dwarf out now that we've got the entire
// CU then construct a skeleton CU based upon it.
if (useSplitDwarf()) {
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 1eb7e3ecea..9a38256d8e 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -555,9 +555,6 @@ private:
/// \brief Construct subprogram DIE.
void constructSubprogramDIE(CompileUnit *TheCU, const MDNode *N);
- /// \brief Construct import_module DIE.
- void constructImportedModuleDIE(CompileUnit *TheCU, const MDNode *N);
-
/// \brief Register a source line with debug info. Returns the unique
/// label that was emitted and which provides correspondence to the
/// source line list.
diff --git a/lib/IR/DIBuilder.cpp b/lib/IR/DIBuilder.cpp
index 2e981a5d68..9d6e840729 100644
--- a/lib/IR/DIBuilder.cpp
+++ b/lib/IR/DIBuilder.cpp
@@ -61,9 +61,6 @@ void DIBuilder::finalize() {
DIArray GVs = getOrCreateArray(AllGVs);
DIType(TempGVs).replaceAllUsesWith(GVs);
-
- DIArray IMs = getOrCreateArray(AllImportedModules);
- DIType(TempImportedModules).replaceAllUsesWith(IMs);
}
/// getNonCompileUnitScope - If N is compile unit return NULL otherwise return
@@ -104,8 +101,6 @@ void DIBuilder::createCompileUnit(unsigned Lang, StringRef Filename,
TempGVs = MDNode::getTemporary(VMContext, TElts);
- TempImportedModules = MDNode::getTemporary(VMContext, TElts);
-
Value *Elts[] = {
GetTagConstant(VMContext, dwarf::DW_TAG_compile_unit),
createFilePathPair(VMContext, Filename, Directory),
@@ -118,7 +113,6 @@ void DIBuilder::createCompileUnit(unsigned Lang, StringRef Filename,
TempRetainTypes,
TempSubprograms,
TempGVs,
- TempImportedModules,
MDString::get(VMContext, SplitName)
};
TheCU = DICompileUnit(MDNode::get(VMContext, Elts));
@@ -128,21 +122,6 @@ void DIBuilder::createCompileUnit(unsigned Lang, StringRef Filename,
NMD->addOperand(TheCU);
}
-DIImportedModule DIBuilder::createImportedModule(DIScope Context,
- DINameSpace NS,
- unsigned Line) {
- Value *Elts[] = {
- GetTagConstant(VMContext, dwarf::DW_TAG_imported_module),
- Context,
- NS,
- ConstantInt::get(Type::getInt32Ty(VMContext), Line),
- };
- DIImportedModule M(MDNode::get(VMContext, Elts));
- assert(M.Verify() && "Imported module should be valid");
- AllImportedModules.push_back(M);
- return M;
-}
-
/// createFile - Create a file descriptor to hold debugging information
/// for a file.
DIFile DIBuilder::createFile(StringRef Filename, StringRef Directory) {
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp
index ec83dcaf52..10beb69824 100644
--- a/lib/IR/DebugInfo.cpp
+++ b/lib/IR/DebugInfo.cpp
@@ -64,8 +64,7 @@ bool DIDescriptor::Verify() const {
DISubrange(DbgNode).Verify() || DIEnumerator(DbgNode).Verify() ||
DIObjCProperty(DbgNode).Verify() ||
DITemplateTypeParameter(DbgNode).Verify() ||
- DITemplateValueParameter(DbgNode).Verify() ||
- DIImportedModule(DbgNode).Verify());
+ DITemplateValueParameter(DbgNode).Verify());
}
static Value *getField(const MDNode *DbgNode, unsigned Elt) {
@@ -337,12 +336,6 @@ bool DIDescriptor::isEnumerator() const {
bool DIDescriptor::isObjCProperty() const {
return DbgNode && getTag() == dwarf::DW_TAG_APPLE_property;
}
-
-/// \brief Return true if the specified tag is DW_TAG_imported_module.
-bool DIDescriptor::isImportedModule() const {
- return DbgNode && getTag() == dwarf::DW_TAG_imported_module;
-}
-
//===----------------------------------------------------------------------===//
// Simple Descriptor Constructors and other Methods
//===----------------------------------------------------------------------===//
@@ -425,7 +418,7 @@ bool DICompileUnit::Verify() const {
if (N.empty())
return false;
// It is possible that directory and produce string is empty.
- return DbgNode->getNumOperands() == 13;
+ return DbgNode->getNumOperands() == 12;
}
/// Verify - Verify that an ObjC property is well formed.
@@ -587,11 +580,6 @@ bool DITemplateValueParameter::Verify() const {
return isTemplateValueParameter() && DbgNode->getNumOperands() == 8;
}
-/// \brief Verify that the imported module descriptor is well formed.
-bool DIImportedModule::Verify() const {
- return isImportedModule() && DbgNode->getNumOperands() == 4;
-}
-
/// getOriginalTypeSize - If this type is derived from a base type then
/// return base type size.
uint64_t DIDerivedType::getOriginalTypeSize() const {
@@ -706,7 +694,7 @@ StringRef DIScope::getDirectory() const {
}
DIArray DICompileUnit::getEnumTypes() const {
- if (!DbgNode || DbgNode->getNumOperands() < 13)
+ if (!DbgNode || DbgNode->getNumOperands() < 12)
return DIArray();
if (MDNode *N = dyn_cast_or_null<MDNode>(DbgNode->getOperand(7)))
@@ -715,7 +703,7 @@ DIArray DICompileUnit::getEnumTypes() const {
}
DIArray DICompileUnit::getRetainedTypes() const {
- if (!DbgNode || DbgNode->getNumOperands() < 13)
+ if (!DbgNode || DbgNode->getNumOperands() < 12)
return DIArray();
if (MDNode *N = dyn_cast_or_null<MDNode>(DbgNode->getOperand(8)))
@@ -724,7 +712,7 @@ DIArray DICompileUnit::getRetainedTypes() const {
}
DIArray DICompileUnit::getSubprograms() const {
- if (!DbgNode || DbgNode->getNumOperands() < 13)
+ if (!DbgNode || DbgNode->getNumOperands() < 12)
return DIArray();
if (MDNode *N = dyn_cast_or_null<MDNode>(DbgNode->getOperand(9)))
@@ -734,7 +722,7 @@ DIArray DICompileUnit::getSubprograms() const {
DIArray DICompileUnit::getGlobalVariables() const {
- if (!DbgNode || DbgNode->getNumOperands() < 13)
+ if (!DbgNode || DbgNode->getNumOperands() < 12)
return DIArray();
if (MDNode *N = dyn_cast_or_null<MDNode>(DbgNode->getOperand(10)))
@@ -742,15 +730,6 @@ DIArray DICompileUnit::getGlobalVariables() const {
return DIArray();
}
-DIArray DICompileUnit::getImportedModules() const {
- if (!DbgNode || DbgNode->getNumOperands() < 13)
- return DIArray();
-
- if (MDNode *N = dyn_cast_or_null<MDNode>(DbgNode->getOperand(11)))
- return DIArray(N);
- return DIArray();
-}
-
/// fixupObjcLikeName - Replace contains special characters used
/// in a typical Objective-C names with '.' in a given string.
static void fixupObjcLikeName(StringRef Str, SmallVectorImpl<char> &Out) {
diff --git a/test/CodeGen/ARM/2010-08-04-StackVariable.ll b/test/CodeGen/ARM/2010-08-04-StackVariable.ll
index 112512ff59..91a9903f38 100644
--- a/