Use a better name for compile unit labels.
They mark the start of a compile unit, so name them .Lcu_*. Using
Section->getLabelBeginName() makes it looks like they mark the start of the
section.
While at it, switch to createTempSymbol to avoid collisions with labels
created in inline assembly. Not sure if a "don't crash" test is worth it.
With this getLabelBeginName is dead, delete it.
llvm-svn: 231750
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index 64bee0c..8564949 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -714,8 +714,7 @@
void DwarfCompileUnit::emitHeader(const MCSymbol *ASectionSym) {
// Don't bother labeling the .dwo unit, as its offset isn't used.
if (!Skeleton) {
- LabelBegin =
- Asm->GetTempSymbol(Section->getLabelBeginName(), getUniqueID());
+ LabelBegin = Asm->createTempSymbol("cu_begin", getUniqueID());
Asm->OutStreamer.EmitLabel(LabelBegin);
}