[llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp DwarfWriter.cpp
Jim Laskey
jlaskey at apple.com
Thu Feb 1 09:46:27 PST 2007
Changes in directory llvm/lib/CodeGen:
AsmPrinter.cpp updated: 1.142 -> 1.143
DwarfWriter.cpp updated: 1.123 -> 1.124
---
Log message:
Emit labels as label_n and not as debug_n
---
Diffs of the changes: (+9 -9)
AsmPrinter.cpp | 2 +-
DwarfWriter.cpp | 16 ++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)
Index: llvm/lib/CodeGen/AsmPrinter.cpp
diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.142 llvm/lib/CodeGen/AsmPrinter.cpp:1.143
--- llvm/lib/CodeGen/AsmPrinter.cpp:1.142 Thu Feb 1 10:31:34 2007
+++ llvm/lib/CodeGen/AsmPrinter.cpp Thu Feb 1 11:46:10 2007
@@ -1034,7 +1034,7 @@
void AsmPrinter::printLabel(const MachineInstr *MI) const {
O << "\n"
<< TAI->getPrivateGlobalPrefix()
- << "debug_loc"
+ << "label_"
<< MI->getOperand(0).getImmedValue()
<< ":\n";
}
Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.123 llvm/lib/CodeGen/DwarfWriter.cpp:1.124
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.123 Thu Feb 1 10:31:34 2007
+++ llvm/lib/CodeGen/DwarfWriter.cpp Thu Feb 1 11:46:10 2007
@@ -80,7 +80,7 @@
if (O) print(*O);
}
void print(std::ostream &O) const {
- O << ".debug_" << Tag;
+ O << ".D" << Tag;
if (Number) O << Number;
}
#endif
@@ -839,7 +839,7 @@
}
void PrintLabelName(const char *Tag, unsigned Number) const {
O << TAI->getPrivateGlobalPrefix()
- << "debug_"
+ << ((Tag && *Tag) ? "debug_" : "label_")
<< Tag;
if (Number) O << Number;
}
@@ -932,7 +932,7 @@
Asm->TM.getFrameInfo()->getStackGrowthDirection() ==
TargetFrameInfo::StackGrowsUp ?
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) {
MachineMove &Move = Moves[i];
@@ -952,11 +952,11 @@
if (BaseLabel && LabelID && (BaseLabelID != LabelID || !IsLocal)) {
Asm->EmitInt8(DW_CFA_advance_loc4);
Asm->EOL("DW_CFA_advance_loc4");
- EmitDifference("loc", LabelID, BaseLabel, BaseLabelID, true);
+ EmitDifference("", LabelID, BaseLabel, BaseLabelID, true);
Asm->EOL("");
BaseLabelID = LabelID;
- BaseLabel = "loc";
+ BaseLabel = "";
IsLocal = true;
}
@@ -1850,14 +1850,14 @@
// Add the scope bounds.
if (StartID) {
AddLabel(ScopeDie, DW_AT_low_pc, DW_FORM_addr,
- DWLabel("loc", StartID));
+ DWLabel("", StartID));
} else {
AddLabel(ScopeDie, DW_AT_low_pc, DW_FORM_addr,
DWLabel("func_begin", SubprogramCount));
}
if (EndID) {
AddLabel(ScopeDie, DW_AT_high_pc, DW_FORM_addr,
- DWLabel("loc", EndID));
+ DWLabel("", EndID));
} else {
AddLabel(ScopeDie, DW_AT_high_pc, DW_FORM_addr,
DWLabel("func_end", SubprogramCount));
@@ -2217,7 +2217,7 @@
Asm->EmitInt8(0); Asm->EOL("Extended Op");
Asm->EmitInt8(TAI->getAddressSize() + 1); Asm->EOL("Op size");
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 (Source != LineInfo.getSourceID()) {
More information about the llvm-commits
mailing list