Emit labels as label_n and not as debug_n

llvm-svn: 33757
This commit is contained in:
Jim Laskey 2007-02-01 17:46:10 +00:00
parent dd924e4e95
commit 894ceb1c6f
2 changed files with 9 additions and 9 deletions

View File

@ -1034,7 +1034,7 @@ void AsmPrinter::printInlineAsm(const MachineInstr *MI) const {
void AsmPrinter::printLabel(const MachineInstr *MI) const { void AsmPrinter::printLabel(const MachineInstr *MI) const {
O << "\n" O << "\n"
<< TAI->getPrivateGlobalPrefix() << TAI->getPrivateGlobalPrefix()
<< "debug_loc" << "label_"
<< MI->getOperand(0).getImmedValue() << MI->getOperand(0).getImmedValue()
<< ":\n"; << ":\n";
} }

View File

@ -80,7 +80,7 @@ public:
if (O) print(*O); if (O) print(*O);
} }
void print(std::ostream &O) const { void print(std::ostream &O) const {
O << ".debug_" << Tag; O << ".D" << Tag;
if (Number) O << Number; if (Number) O << Number;
} }
#endif #endif
@ -839,7 +839,7 @@ public:
} }
void PrintLabelName(const char *Tag, unsigned Number) const { void PrintLabelName(const char *Tag, unsigned Number) const {
O << TAI->getPrivateGlobalPrefix() O << TAI->getPrivateGlobalPrefix()
<< "debug_" << ((Tag && *Tag) ? "debug_" : "label_")
<< Tag; << Tag;
if (Number) O << Number; if (Number) O << Number;
} }
@ -932,7 +932,7 @@ public:
Asm->TM.getFrameInfo()->getStackGrowthDirection() == Asm->TM.getFrameInfo()->getStackGrowthDirection() ==
TargetFrameInfo::StackGrowsUp ? TargetFrameInfo::StackGrowsUp ?
TAI->getAddressSize() : -TAI->getAddressSize(); TAI->getAddressSize() : -TAI->getAddressSize();
bool IsLocal = BaseLabel && strcmp(BaseLabel, "loc") == 0; bool IsLocal = BaseLabel && strcmp(BaseLabel, "") == 0;
for (unsigned i = 0, N = Moves.size(); i < N; ++i) { for (unsigned i = 0, N = Moves.size(); i < N; ++i) {
MachineMove &Move = Moves[i]; MachineMove &Move = Moves[i];
@ -952,11 +952,11 @@ public:
if (BaseLabel && LabelID && (BaseLabelID != LabelID || !IsLocal)) { if (BaseLabel && LabelID && (BaseLabelID != LabelID || !IsLocal)) {
Asm->EmitInt8(DW_CFA_advance_loc4); Asm->EmitInt8(DW_CFA_advance_loc4);
Asm->EOL("DW_CFA_advance_loc4"); Asm->EOL("DW_CFA_advance_loc4");
EmitDifference("loc", LabelID, BaseLabel, BaseLabelID, true); EmitDifference("", LabelID, BaseLabel, BaseLabelID, true);
Asm->EOL(""); Asm->EOL("");
BaseLabelID = LabelID; BaseLabelID = LabelID;
BaseLabel = "loc"; BaseLabel = "";
IsLocal = true; IsLocal = true;
} }
@ -1850,14 +1850,14 @@ private:
// Add the scope bounds. // Add the scope bounds.
if (StartID) { if (StartID) {
AddLabel(ScopeDie, DW_AT_low_pc, DW_FORM_addr, AddLabel(ScopeDie, DW_AT_low_pc, DW_FORM_addr,
DWLabel("loc", StartID)); DWLabel("", StartID));
} else { } else {
AddLabel(ScopeDie, DW_AT_low_pc, DW_FORM_addr, AddLabel(ScopeDie, DW_AT_low_pc, DW_FORM_addr,
DWLabel("func_begin", SubprogramCount)); DWLabel("func_begin", SubprogramCount));
} }
if (EndID) { if (EndID) {
AddLabel(ScopeDie, DW_AT_high_pc, DW_FORM_addr, AddLabel(ScopeDie, DW_AT_high_pc, DW_FORM_addr,
DWLabel("loc", EndID)); DWLabel("", EndID));
} else { } else {
AddLabel(ScopeDie, DW_AT_high_pc, DW_FORM_addr, AddLabel(ScopeDie, DW_AT_high_pc, DW_FORM_addr,
DWLabel("func_end", SubprogramCount)); DWLabel("func_end", SubprogramCount));
@ -2217,7 +2217,7 @@ private:
Asm->EmitInt8(0); Asm->EOL("Extended Op"); Asm->EmitInt8(0); Asm->EOL("Extended Op");
Asm->EmitInt8(TAI->getAddressSize() + 1); Asm->EOL("Op size"); Asm->EmitInt8(TAI->getAddressSize() + 1); Asm->EOL("Op size");
Asm->EmitInt8(DW_LNE_set_address); Asm->EOL("DW_LNE_set_address"); Asm->EmitInt8(DW_LNE_set_address); Asm->EOL("DW_LNE_set_address");
EmitReference("loc", LabelID); Asm->EOL("Location label"); EmitReference("", LabelID); Asm->EOL("Location label");
// If change of source, then switch to the new source. // If change of source, then switch to the new source.
if (Source != LineInfo.getSourceID()) { if (Source != LineInfo.getSourceID()) {