[llvm] r341513 - [DebugInfo] Do not generate label debug info if it has been processed.
Hsiangkai Wang via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 5 19:22:07 PDT 2018
Author: hsiangkai
Date: Wed Sep 5 19:22:06 2018
New Revision: 341513
URL: http://llvm.org/viewvc/llvm-project?rev=341513&view=rev
Log:
[DebugInfo] Do not generate label debug info if it has been processed.
In DwarfDebug::collectEntityInfo(), if the label entity is processed in
DbgLabels list, it means the label is not optimized out. There is no
need to generate debug info for it with null position.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.h
llvm/trunk/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.h
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h
llvm/trunk/test/DebugInfo/Generic/debug-label.ll
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp?rev=341513&r1=341512&r2=341513&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp Wed Sep 5 19:22:06 2018
@@ -1048,7 +1048,7 @@ CodeViewDebug::createDefRangeGeneral(uin
}
void CodeViewDebug::collectVariableInfoFromMFTable(
- DenseSet<InlinedVariable> &Processed) {
+ DenseSet<InlinedEntity> &Processed) {
const MachineFunction &MF = *Asm->MF;
const TargetSubtargetInfo &TSI = MF.getSubtarget();
const TargetFrameLowering *TFI = TSI.getFrameLowering();
@@ -1060,7 +1060,7 @@ void CodeViewDebug::collectVariableInfoF
assert(VI.Var->isValidLocationForIntrinsic(VI.Loc) &&
"Expected inlined-at fields to agree");
- Processed.insert(InlinedVariable(VI.Var, VI.Loc->getInlinedAt()));
+ Processed.insert(InlinedEntity(VI.Var, VI.Loc->getInlinedAt()));
LexicalScope *Scope = LScopes.findLexicalScope(VI.Loc);
// If variable scope is not found then skip this variable.
@@ -1196,15 +1196,15 @@ void CodeViewDebug::calculateRanges(
}
void CodeViewDebug::collectVariableInfo(const DISubprogram *SP) {
- DenseSet<InlinedVariable> Processed;
+ DenseSet<InlinedEntity> Processed;
// Grab the variable info that was squirreled away in the MMI side-table.
collectVariableInfoFromMFTable(Processed);
for (const auto &I : DbgValues) {
- InlinedVariable IV = I.first;
+ InlinedEntity IV = I.first;
if (Processed.count(IV))
continue;
- const DILocalVariable *DIVar = IV.first;
+ const DILocalVariable *DIVar = cast<DILocalVariable>(IV.first);
const DILocation *InlinedAt = IV.second;
// Instruction ranges, specifying where IV is accessible.
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.h?rev=341513&r1=341512&r2=341513&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.h Wed Sep 5 19:22:06 2018
@@ -277,11 +277,11 @@ class LLVM_LIBRARY_VISIBILITY CodeViewDe
void emitInlinedCallSite(const FunctionInfo &FI, const DILocation *InlinedAt,
const InlineSite &Site);
- using InlinedVariable = DbgValueHistoryMap::InlinedVariable;
+ using InlinedEntity = DbgValueHistoryMap::InlinedEntity;
void collectVariableInfo(const DISubprogram *SP);
- void collectVariableInfoFromMFTable(DenseSet<InlinedVariable> &Processed);
+ void collectVariableInfoFromMFTable(DenseSet<InlinedEntity> &Processed);
// Construct the lexical block tree for a routine, pruning emptpy lexical
// scopes, and populate it with local variables.
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp?rev=341513&r1=341512&r2=341513&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp Wed Sep 5 19:22:06 2018
@@ -42,7 +42,7 @@ static unsigned isDescribedByReg(const M
return MI.getOperand(0).isReg() ? MI.getOperand(0).getReg() : 0;
}
-void DbgValueHistoryMap::startInstrRange(InlinedVariable Var,
+void DbgValueHistoryMap::startInstrRange(InlinedEntity Var,
const MachineInstr &MI) {
// Instruction range should start with a DBG_VALUE instruction for the
// variable.
@@ -57,7 +57,7 @@ void DbgValueHistoryMap::startInstrRange
Ranges.push_back(std::make_pair(&MI, nullptr));
}
-void DbgValueHistoryMap::endInstrRange(InlinedVariable Var,
+void DbgValueHistoryMap::endInstrRange(InlinedEntity Var,
const MachineInstr &MI) {
auto &Ranges = VarInstrRanges[Var];
// Verify that the current instruction range is not yet closed.
@@ -68,7 +68,7 @@ void DbgValueHistoryMap::endInstrRange(I
Ranges.back().second = &MI;
}
-unsigned DbgValueHistoryMap::getRegisterForVar(InlinedVariable Var) const {
+unsigned DbgValueHistoryMap::getRegisterForVar(InlinedEntity Var) const {
const auto &I = VarInstrRanges.find(Var);
if (I == VarInstrRanges.end())
return 0;
@@ -78,7 +78,7 @@ unsigned DbgValueHistoryMap::getRegister
return isDescribedByReg(*Ranges.back().first);
}
-void DbgLabelInstrMap::addInstr(InlinedLabel Label, const MachineInstr &MI) {
+void DbgLabelInstrMap::addInstr(InlinedEntity Label, const MachineInstr &MI) {
assert(MI.isDebugLabel() && "not a DBG_LABEL");
LabelInstr[Label] = &MI;
}
@@ -86,15 +86,14 @@ void DbgLabelInstrMap::addInstr(InlinedL
namespace {
// Maps physreg numbers to the variables they describe.
-using InlinedVariable = DbgValueHistoryMap::InlinedVariable;
-using RegDescribedVarsMap = std::map<unsigned, SmallVector<InlinedVariable, 1>>;
-using InlinedLabel = DbgLabelInstrMap::InlinedLabel;
+using InlinedEntity = DbgValueHistoryMap::InlinedEntity;
+using RegDescribedVarsMap = std::map<unsigned, SmallVector<InlinedEntity, 1>>;
} // end anonymous namespace
// Claim that @Var is not described by @RegNo anymore.
static void dropRegDescribedVar(RegDescribedVarsMap &RegVars, unsigned RegNo,
- InlinedVariable Var) {
+ InlinedEntity Var) {
const auto &I = RegVars.find(RegNo);
assert(RegNo != 0U && I != RegVars.end());
auto &VarSet = I->second;
@@ -108,7 +107,7 @@ static void dropRegDescribedVar(RegDescr
// Claim that @Var is now described by @RegNo.
static void addRegDescribedVar(RegDescribedVarsMap &RegVars, unsigned RegNo,
- InlinedVariable Var) {
+ InlinedEntity Var) {
assert(RegNo != 0U);
auto &VarSet = RegVars[RegNo];
assert(!is_contained(VarSet, Var));
@@ -249,7 +248,7 @@ void llvm::calculateDbgEntityHistory(con
const DILocalVariable *RawVar = MI.getDebugVariable();
assert(RawVar->isValidLocationForIntrinsic(MI.getDebugLoc()) &&
"Expected inlined-at fields to agree");
- InlinedVariable Var(RawVar, MI.getDebugLoc()->getInlinedAt());
+ InlinedEntity Var(RawVar, MI.getDebugLoc()->getInlinedAt());
if (unsigned PrevReg = DbgValues.getRegisterForVar(Var))
dropRegDescribedVar(RegVars, PrevReg, Var);
@@ -266,7 +265,7 @@ void llvm::calculateDbgEntityHistory(con
// When collecting debug information for labels, there is no MCSymbol
// generated for it. So, we keep MachineInstr in DbgLabels in order
// to query MCSymbol afterward.
- InlinedLabel L(RawLabel, MI.getDebugLoc()->getInlinedAt());
+ InlinedEntity L(RawLabel, MI.getDebugLoc()->getInlinedAt());
DbgLabels.addInstr(L, MI);
}
}
@@ -289,10 +288,10 @@ void llvm::calculateDbgEntityHistory(con
LLVM_DUMP_METHOD void DbgValueHistoryMap::dump() const {
dbgs() << "DbgValueHistoryMap:\n";
for (const auto &VarRangePair : *this) {
- const InlinedVariable &Var = VarRangePair.first;
+ const InlinedEntity &Var = VarRangePair.first;
const InstrRanges &Ranges = VarRangePair.second;
- const DILocalVariable *LocalVar = Var.first;
+ const DILocalVariable *LocalVar = cast<DILocalVariable>(Var.first);
const DILocation *Location = Var.second;
dbgs() << " - " << LocalVar->getName() << " at ";
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.h?rev=341513&r1=341512&r2=341513&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.h Wed Sep 5 19:22:06 2018
@@ -33,20 +33,19 @@ class DbgValueHistoryMap {
public:
using InstrRange = std::pair<const MachineInstr *, const MachineInstr *>;
using InstrRanges = SmallVector<InstrRange, 4>;
- using InlinedVariable =
- std::pair<const DILocalVariable *, const DILocation *>;
- using InstrRangesMap = MapVector<InlinedVariable, InstrRanges>;
+ using InlinedEntity = std::pair<const DINode *, const DILocation *>;
+ using InstrRangesMap = MapVector<InlinedEntity, InstrRanges>;
private:
InstrRangesMap VarInstrRanges;
public:
- void startInstrRange(InlinedVariable Var, const MachineInstr &MI);
- void endInstrRange(InlinedVariable Var, const MachineInstr &MI);
+ void startInstrRange(InlinedEntity Var, const MachineInstr &MI);
+ void endInstrRange(InlinedEntity Var, const MachineInstr &MI);
// Returns register currently describing @Var. If @Var is currently
// unaccessible or is not described by a register, returns 0.
- unsigned getRegisterForVar(InlinedVariable Var) const;
+ unsigned getRegisterForVar(InlinedEntity Var) const;
bool empty() const { return VarInstrRanges.empty(); }
void clear() { VarInstrRanges.clear(); }
@@ -63,14 +62,14 @@ public:
/// a temporary (assembler) label before it.
class DbgLabelInstrMap {
public:
- using InlinedLabel = std::pair<const DILabel *, const DILocation *>;
- using InstrMap = MapVector<InlinedLabel, const MachineInstr *>;
+ using InlinedEntity = std::pair<const DINode *, const DILocation *>;
+ using InstrMap = MapVector<InlinedEntity, const MachineInstr *>;
private:
InstrMap LabelInstr;
public:
- void addInstr(InlinedLabel Label, const MachineInstr &MI);
+ void addInstr(InlinedEntity Label, const MachineInstr &MI);
bool empty() const { return LabelInstr.empty(); }
void clear() { LabelInstr.clear(); }
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h?rev=341513&r1=341512&r2=341513&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h Wed Sep 5 19:22:06 2018
@@ -216,7 +216,7 @@ public:
void finishEntityDefinition(const DbgEntity *Entity);
/// Find abstract variable associated with Var.
- using InlinedVariable = DbgValueHistoryMap::InlinedVariable;
+ using InlinedEntity = DbgValueHistoryMap::InlinedEntity;
DbgEntity *getExistingAbstractEntity(const DINode *Node);
void createAbstractEntity(const DINode *Node, LexicalScope *Scope);
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=341513&r1=341512&r2=341513&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Sep 5 19:22:06 2018
@@ -938,15 +938,15 @@ void DwarfDebug::ensureAbstractEntityIsC
// Collect variable information from side table maintained by MF.
void DwarfDebug::collectVariableInfoFromMFTable(
- DwarfCompileUnit &TheCU, DenseSet<InlinedVariable> &Processed) {
- SmallDenseMap<InlinedVariable, DbgVariable *> MFVars;
+ DwarfCompileUnit &TheCU, DenseSet<InlinedEntity> &Processed) {
+ SmallDenseMap<InlinedEntity, DbgVariable *> MFVars;
for (const auto &VI : Asm->MF->getVariableDbgInfo()) {
if (!VI.Var)
continue;
assert(VI.Var->isValidLocationForIntrinsic(VI.Loc) &&
"Expected inlined-at fields to agree");
- InlinedVariable Var(VI.Var, VI.Loc->getInlinedAt());
+ InlinedEntity Var(VI.Var, VI.Loc->getInlinedAt());
Processed.insert(Var);
LexicalScope *Scope = LScopes.findLexicalScope(VI.Loc);
@@ -955,7 +955,8 @@ void DwarfDebug::collectVariableInfoFrom
continue;
ensureAbstractEntityIsCreatedIfScoped(TheCU, Var.first, Scope->getScopeNode());
- auto RegVar = llvm::make_unique<DbgVariable>(Var.first, Var.second);
+ auto RegVar = llvm::make_unique<DbgVariable>(
+ cast<DILocalVariable>(Var.first), Var.second);
RegVar->initializeMMI(VI.Expr, VI.Slot);
if (DbgVariable *DbgVar = MFVars.lookup(Var))
DbgVar->addMMIEntry(*RegVar);
@@ -1209,12 +1210,12 @@ static bool validThroughout(LexicalScope
// Find variables for each lexical scope.
void DwarfDebug::collectEntityInfo(DwarfCompileUnit &TheCU,
const DISubprogram *SP,
- DenseSet<InlinedVariable> &Processed) {
+ DenseSet<InlinedEntity> &Processed) {
// Grab the variable info that was squirreled away in the MMI side-table.
collectVariableInfoFromMFTable(TheCU, Processed);
for (const auto &I : DbgValues) {
- InlinedVariable IV = I.first;
+ InlinedEntity IV = I.first;
if (Processed.count(IV))
continue;
@@ -1224,17 +1225,18 @@ void DwarfDebug::collectEntityInfo(Dwarf
continue;
LexicalScope *Scope = nullptr;
+ const DILocalVariable *LocalVar = cast<DILocalVariable>(IV.first);
if (const DILocation *IA = IV.second)
- Scope = LScopes.findInlinedScope(IV.first->getScope(), IA);
+ Scope = LScopes.findInlinedScope(LocalVar->getScope(), IA);
else
- Scope = LScopes.findLexicalScope(IV.first->getScope());
+ Scope = LScopes.findLexicalScope(LocalVar->getScope());
// If variable scope is not found then skip this variable.
if (!Scope)
continue;
Processed.insert(IV);
DbgVariable *RegVar = cast<DbgVariable>(createConcreteEntity(TheCU,
- *Scope, IV.first, IV.second));
+ *Scope, LocalVar, IV.second));
const MachineInstr *MInsn = Ranges.front().first;
assert(MInsn->isDebugValue() && "History must begin with debug value");
@@ -1260,44 +1262,46 @@ void DwarfDebug::collectEntityInfo(Dwarf
// unique identifiers, so don't bother resolving the type with the
// identifier map.
const DIBasicType *BT = dyn_cast<DIBasicType>(
- static_cast<const Metadata *>(IV.first->getType()));
+ static_cast<const Metadata *>(LocalVar->getType()));
// Finalize the entry by lowering it into a DWARF bytestream.
for (auto &Entry : Entries)
Entry.finalize(*Asm, List, BT);
}
- // For each InlinedLabel collected from DBG_LABEL instructions, convert to
+ // For each InlinedEntity collected from DBG_LABEL instructions, convert to
// DWARF-related DbgLabel.
for (const auto &I : DbgLabels) {
- InlinedLabel IL = I.first;
+ InlinedEntity IL = I.first;
const MachineInstr *MI = I.second;
if (MI == nullptr)
continue;
LexicalScope *Scope = nullptr;
+ const DILabel *Label = cast<DILabel>(IL.first);
// Get inlined DILocation if it is inlined label.
if (const DILocation *IA = IL.second)
- Scope = LScopes.findInlinedScope(IL.first->getScope(), IA);
+ Scope = LScopes.findInlinedScope(Label->getScope(), IA);
else
- Scope = LScopes.findLexicalScope(IL.first->getScope());
+ Scope = LScopes.findLexicalScope(Label->getScope());
// If label scope is not found then skip this label.
if (!Scope)
continue;
+ Processed.insert(IL);
/// At this point, the temporary label is created.
/// Save the temporary label to DbgLabel entity to get the
/// actually address when generating Dwarf DIE.
MCSymbol *Sym = getLabelBeforeInsn(MI);
- createConcreteEntity(TheCU, *Scope, IL.first, IL.second, Sym);
+ createConcreteEntity(TheCU, *Scope, Label, IL.second, Sym);
}
// Collect info for variables/labels that were optimized out.
for (const DINode *DN : SP->getRetainedNodes()) {
+ if (!Processed.insert(InlinedEntity(DN, nullptr)).second)
+ continue;
LexicalScope *Scope = nullptr;
if (auto *DV = dyn_cast<DILocalVariable>(DN)) {
- if (!Processed.insert(InlinedVariable(DV, nullptr)).second)
- continue;
Scope = LScopes.findLexicalScope(DV->getScope());
} else if (auto *DL = dyn_cast<DILabel>(DN)) {
Scope = LScopes.findLexicalScope(DL->getScope());
@@ -1466,8 +1470,8 @@ void DwarfDebug::endFunctionImpl(const M
return;
}
- DenseSet<InlinedVariable> ProcessedVars;
- collectEntityInfo(TheCU, SP, ProcessedVars);
+ DenseSet<InlinedEntity> Processed;
+ collectEntityInfo(TheCU, SP, Processed);
// Add the range of this function to the list of ranges for the CU.
TheCU.addRange(RangeSpan(Asm->getFunctionBegin(), Asm->getFunctionEnd()));
@@ -1491,16 +1495,21 @@ void DwarfDebug::endFunctionImpl(const M
for (LexicalScope *AScope : LScopes.getAbstractScopesList()) {
auto *SP = cast<DISubprogram>(AScope->getScopeNode());
for (const DINode *DN : SP->getRetainedNodes()) {
- if (auto *DV = dyn_cast<DILocalVariable>(DN)) {
- // Collect info for variables that were optimized out.
- if (!ProcessedVars.insert(InlinedVariable(DV, nullptr)).second)
- continue;
- ensureAbstractEntityIsCreated(TheCU, DV, DV->getScope());
- assert(LScopes.getAbstractScopesList().size() == NumAbstractScopes
- && "ensureAbstractEntityIsCreated inserted abstract scopes");
- } else if (auto *DL = dyn_cast<DILabel>(DN)) {
- ensureAbstractEntityIsCreated(TheCU, DL, DL->getScope());
- }
+ if (!Processed.insert(InlinedEntity(DN, nullptr)).second)
+ continue;
+
+ const MDNode *Scope = nullptr;
+ if (auto *DV = dyn_cast<DILocalVariable>(DN))
+ Scope = DV->getScope();
+ else if (auto *DL = dyn_cast<DILabel>(DN))
+ Scope = DL->getScope();
+ else
+ llvm_unreachable("Unexpected DI type!");
+
+ // Collect info for variables/labels that were optimized out.
+ ensureAbstractEntityIsCreated(TheCU, DN, Scope);
+ assert(LScopes.getAbstractScopesList().size() == NumAbstractScopes
+ && "ensureAbstractEntityIsCreated inserted abstract scopes");
}
constructAbstractSubprogramScopeDIE(TheCU, AScope);
}
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h?rev=341513&r1=341512&r2=341513&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h Wed Sep 5 19:22:06 2018
@@ -406,8 +406,7 @@ class DwarfDebug : public DebugHandlerBa
return InfoHolder.getUnits();
}
- using InlinedVariable = DbgValueHistoryMap::InlinedVariable;
- using InlinedLabel = DbgLabelInstrMap::InlinedLabel;
+ using InlinedEntity = DbgValueHistoryMap::InlinedEntity;
void ensureAbstractEntityIsCreated(DwarfCompileUnit &CU,
const DINode *Node,
@@ -550,7 +549,7 @@ class DwarfDebug : public DebugHandlerBa
/// Populate LexicalScope entries with variables' info.
void collectEntityInfo(DwarfCompileUnit &TheCU, const DISubprogram *SP,
- DenseSet<InlinedVariable> &ProcessedVars);
+ DenseSet<InlinedEntity> &ProcessedVars);
/// Build the location list for all DBG_VALUEs in the
/// function that describe the same variable.
@@ -559,7 +558,7 @@ class DwarfDebug : public DebugHandlerBa
/// Collect variable information from the side table maintained by MF.
void collectVariableInfoFromMFTable(DwarfCompileUnit &TheCU,
- DenseSet<InlinedVariable> &P);
+ DenseSet<InlinedEntity> &P);
/// Emit the reference to the section.
void emitSectionReference(const DwarfCompileUnit &CU);
Modified: llvm/trunk/test/DebugInfo/Generic/debug-label.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Generic/debug-label.ll?rev=341513&r1=341512&r2=341513&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/Generic/debug-label.ll (original)
+++ llvm/trunk/test/DebugInfo/Generic/debug-label.ll Wed Sep 5 19:22:06 2018
@@ -11,6 +11,7 @@
; CHECK-NEXT: DW_AT_decl_file [DW_FORM_data1] {{.*}}debug-label.c
; CHECK-NEXT: DW_AT_decl_line [DW_FORM_data1] {{.*}}7
; CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] {{.*}}{{0x[0-9a-f]+}}
+; CHECK-NOT: DW_AT_name [DW_FORM_strp] {{.*}}"top"
;
; RUN: llc -O0 -o - %s | FileCheck %s -check-prefix=ASM
;
@@ -61,8 +62,9 @@ declare void @llvm.dbg.label(metadata)
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, isOptimized: false, emissionKind: FullDebug, enums: !2)
!1 = !DIFile(filename: "debug-label.c", directory: "./")
!2 = !{}
+!3 = !{!10}
!4 = !{i32 2, !"Debug Info Version", i32 3}
-!6 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !7, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, unit: !0, retainedNodes: !2)
+!6 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !7, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, unit: !0, retainedNodes: !3)
!7 = !DISubroutineType(types: !8)
!8 = !{!9, !9, !9}
!9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
More information about the llvm-commits
mailing list