Always create a temporary symbol to use with the cfi frame.
This is a small simplification and a small step in fixing pr18743 since
private functions on MachO should be using a 'l' prefix.
llvm-svn: 200994
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp
index 0a69dab..02065da 100644
--- a/llvm/lib/MC/MCStreamer.cpp
+++ b/llvm/lib/MC/MCStreamer.cpp
@@ -267,15 +267,9 @@
void MCStreamer::RecordProcStart(MCDwarfFrameInfo &Frame) {
Frame.Function = LastSymbol;
- // If the function is externally visible, we need to create a local
- // symbol to avoid relocations.
- StringRef Prefix = getContext().getAsmInfo()->getPrivateGlobalPrefix();
- if (LastSymbol && LastSymbol->getName().startswith(Prefix)) {
- Frame.Begin = LastSymbol;
- } else {
- Frame.Begin = getContext().CreateTempSymbol();
- EmitLabel(Frame.Begin);
- }
+ // We need to create a local symbol to avoid relocations.
+ Frame.Begin = getContext().CreateTempSymbol();
+ EmitLabel(Frame.Begin);
}
void MCStreamer::EmitCFIEndProc() {