Index: lib/CodeGen/AsmPrinter/DwarfDebug.cpp |
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp |
index 73bba6989faa4d165cb01abb07ea9d938b4a29bf..dd233eaa1bcc98e523ea0451f7dcd197b0839278 100644 |
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp |
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp |
@@ -606,8 +606,7 @@ DIE *DwarfDebug::constructScopeDIE(CompileUnit *TheCU, LexicalScope *Scope) { |
std::pair<ImportedEntityMap::const_iterator, |
ImportedEntityMap::const_iterator> Range = std::equal_range( |
ScopesWithImportedEntities.begin(), ScopesWithImportedEntities.end(), |
- std::pair<const MDNode *, const MDNode *>(DS, (const MDNode*)0), |
- CompareFirst()); |
+ std::pair<const MDNode *, const MDNode *>(DS, 0), CompareFirst()); |
if (Children.empty() && Range.first == Range.second) |
return NULL; |
ScopeDIE = constructLexicalScopeDIE(TheCU, Scope); |
@@ -708,12 +707,6 @@ CompileUnit *DwarfDebug::constructCompileUnit(const MDNode *N) { |
Asm->OutStreamer.getContext().setMCLineTableSymbol(LineTableStartSym, |
NewCU->getUniqueID()); |
- // Use a single line table if we are using .loc and generating assembly. |
- bool UseTheFirstCU = |
- (Asm->TM.hasMCUseLoc() && |
- Asm->OutStreamer.getKind() == MCStreamer::SK_AsmStreamer) || |
- (NewCU->getUniqueID() == 0); |
- |
// DW_AT_stmt_list is a offset of line number information for this |
// compile unit in debug_line section. For split dwarf this is |
// left in the skeleton CU and so not included. |
@@ -722,9 +715,9 @@ CompileUnit *DwarfDebug::constructCompileUnit(const MDNode *N) { |
if (!useSplitDwarf()) { |
if (Asm->MAI->doesDwarfUseRelocationsAcrossSections()) |
NewCU->addLabel(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4, |
- UseTheFirstCU ? |
+ NewCU->getUniqueID() == 0 ? |
Asm->GetTempSymbol("section_line") : LineTableStartSym); |
- else if (UseTheFirstCU) |
+ else if (NewCU->getUniqueID() == 0) |
NewCU->addUInt(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4, 0); |
else |
NewCU->addDelta(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4, |
@@ -1447,12 +1440,7 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) { |
LexicalScope *FnScope = LScopes.getCurrentFunctionScope(); |
CompileUnit *TheCU = SPMap.lookup(FnScope->getScopeNode()); |
assert(TheCU && "Unable to find compile unit!"); |
- if (Asm->TM.hasMCUseLoc() && |
- Asm->OutStreamer.getKind() == MCStreamer::SK_AsmStreamer) |
- // Use a single line table if we are using .loc and generating assembly. |
- Asm->OutStreamer.getContext().setDwarfCompileUnitID(0); |
- else |
- Asm->OutStreamer.getContext().setDwarfCompileUnitID(TheCU->getUniqueID()); |
+ Asm->OutStreamer.getContext().setDwarfCompileUnitID(TheCU->getUniqueID()); |
FunctionBeginSym = Asm->GetTempSymbol("func_begin", |
Asm->getFunctionNumber()); |