mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Stop producing func.eh symbols on Darwin.
According Nick Kledzik (http://llvm.org/bugs/show_bug.cgi?id=19430#c2): "... mach-o no longer needs names in the __eh_frame section (and has not for years)." Iain Sandoe confirms it is also unnecessary for their old darwin support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211500 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -33,12 +33,6 @@ protected:
|
|||||||
/// weak_definition of constant 0 for an omitted EH frame.
|
/// weak_definition of constant 0 for an omitted EH frame.
|
||||||
bool SupportsWeakOmittedEHFrame;
|
bool SupportsWeakOmittedEHFrame;
|
||||||
|
|
||||||
/// IsFunctionEHFrameSymbolPrivate - This flag is set to true if the
|
|
||||||
/// "EH_frame" symbol for EH information should be an assembler temporary (aka
|
|
||||||
/// private linkage, aka an L or .L label) or false if it should be a normal
|
|
||||||
/// non-.globl label. This defaults to true.
|
|
||||||
bool IsFunctionEHFrameSymbolPrivate;
|
|
||||||
|
|
||||||
/// SupportsCompactUnwindWithoutEHFrame - True if the target object file
|
/// SupportsCompactUnwindWithoutEHFrame - True if the target object file
|
||||||
/// supports emitting a compact unwind section without an associated EH frame
|
/// supports emitting a compact unwind section without an associated EH frame
|
||||||
/// section.
|
/// section.
|
||||||
@@ -201,9 +195,6 @@ public:
|
|||||||
void InitMCObjectFileInfo(StringRef TT, Reloc::Model RM, CodeModel::Model CM,
|
void InitMCObjectFileInfo(StringRef TT, Reloc::Model RM, CodeModel::Model CM,
|
||||||
MCContext &ctx);
|
MCContext &ctx);
|
||||||
|
|
||||||
bool isFunctionEHFrameSymbolPrivate() const {
|
|
||||||
return IsFunctionEHFrameSymbolPrivate;
|
|
||||||
}
|
|
||||||
bool getSupportsWeakOmittedEHFrame() const {
|
bool getSupportsWeakOmittedEHFrame() const {
|
||||||
return SupportsWeakOmittedEHFrame;
|
return SupportsWeakOmittedEHFrame;
|
||||||
}
|
}
|
||||||
|
@@ -1459,13 +1459,6 @@ MCSymbol *FrameEmitterImpl::EmitFDE(MCObjectStreamer &streamer,
|
|||||||
const MCObjectFileInfo *MOFI = context.getObjectFileInfo();
|
const MCObjectFileInfo *MOFI = context.getObjectFileInfo();
|
||||||
bool verboseAsm = streamer.isVerboseAsm();
|
bool verboseAsm = streamer.isVerboseAsm();
|
||||||
|
|
||||||
if (IsEH && frame.Function && !MOFI->isFunctionEHFrameSymbolPrivate()) {
|
|
||||||
MCSymbol *EHSym =
|
|
||||||
context.GetOrCreateSymbol(frame.Function->getName() + Twine(".eh"));
|
|
||||||
streamer.EmitEHSymAttributes(frame.Function, EHSym);
|
|
||||||
streamer.EmitLabel(EHSym);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Length
|
// Length
|
||||||
const MCExpr *Length = MakeStartMinusEndExpr(streamer, *fdeStart, *fdeEnd, 0);
|
const MCExpr *Length = MakeStartMinusEndExpr(streamer, *fdeStart, *fdeEnd, 0);
|
||||||
if (verboseAsm) streamer.AddComment("FDE Length");
|
if (verboseAsm) streamer.AddComment("FDE Length");
|
||||||
|
@@ -41,7 +41,6 @@ static bool useCompactUnwind(const Triple &T) {
|
|||||||
|
|
||||||
void MCObjectFileInfo::InitMachOMCObjectFileInfo(Triple T) {
|
void MCObjectFileInfo::InitMachOMCObjectFileInfo(Triple T) {
|
||||||
// MachO
|
// MachO
|
||||||
IsFunctionEHFrameSymbolPrivate = false;
|
|
||||||
SupportsWeakOmittedEHFrame = false;
|
SupportsWeakOmittedEHFrame = false;
|
||||||
|
|
||||||
if (T.isOSDarwin() &&
|
if (T.isOSDarwin() &&
|
||||||
@@ -802,7 +801,6 @@ void MCObjectFileInfo::InitMCObjectFileInfo(StringRef T, Reloc::Model relocm,
|
|||||||
// Common.
|
// Common.
|
||||||
CommDirectiveSupportsAlignment = true;
|
CommDirectiveSupportsAlignment = true;
|
||||||
SupportsWeakOmittedEHFrame = true;
|
SupportsWeakOmittedEHFrame = true;
|
||||||
IsFunctionEHFrameSymbolPrivate = true;
|
|
||||||
SupportsCompactUnwindWithoutEHFrame = false;
|
SupportsCompactUnwindWithoutEHFrame = false;
|
||||||
|
|
||||||
PersonalityEncoding = LSDAEncoding = FDECFIEncoding = TTypeEncoding =
|
PersonalityEncoding = LSDAEncoding = FDECFIEncoding = TTypeEncoding =
|
||||||
|
@@ -24,7 +24,7 @@ _bar:
|
|||||||
|
|
||||||
// OLD64: Relocations [
|
// OLD64: Relocations [
|
||||||
// OLD64-NEXT: Section __eh_frame {
|
// OLD64-NEXT: Section __eh_frame {
|
||||||
// OLD64-NEXT: 0x20 0 3 1 X86_64_RELOC_SUBTRACTOR 0 _bar.eh
|
// OLD64-NEXT: 0x20 0 3 0 X86_64_RELOC_SUBTRACTOR 0
|
||||||
// OLD64-NEXT: 0x20 0 3 1 X86_64_RELOC_UNSIGNED 0 _bar
|
// OLD64-NEXT: 0x20 0 3 1 X86_64_RELOC_UNSIGNED 0 _bar
|
||||||
// OLD64-NEXT: }
|
// OLD64-NEXT: }
|
||||||
// OLD64-NEXT: ]
|
// OLD64-NEXT: ]
|
||||||
|
@@ -1,25 +0,0 @@
|
|||||||
// RUN: llvm-mc -filetype=obj -triple i686-apple-darwin %s -o - | llvm-readobj -t | FileCheck %s
|
|
||||||
|
|
||||||
// Make sure that the exception handling data has the same visibility as the
|
|
||||||
// function it's generated for.
|
|
||||||
|
|
||||||
.private_extern _main
|
|
||||||
.globl _main
|
|
||||||
_main:
|
|
||||||
.cfi_startproc
|
|
||||||
retl
|
|
||||||
.cfi_endproc
|
|
||||||
|
|
||||||
"_-[NSString(local) isNullOrNil]":
|
|
||||||
.cfi_startproc
|
|
||||||
retl
|
|
||||||
.cfi_endproc
|
|
||||||
|
|
||||||
// CHECK: Name: _-[NSString(local) isNullOrNil].eh
|
|
||||||
|
|
||||||
// CHECK: Name: _main
|
|
||||||
// CHECK-NEXT: PrivateExtern
|
|
||||||
|
|
||||||
// CHECK: Name: _main.eh
|
|
||||||
// CHECK-NEXT: PrivateExtern
|
|
||||||
|
|
Reference in New Issue
Block a user