mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
emit a 0 byte instead of a noop if a function is empty on darwin.
"0" is nice and target independent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94718 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
14c38ec2af
commit
10e7c60c04
@ -376,10 +376,8 @@ void AsmPrinter::EmitFunctionBody() {
|
||||
// If the function is empty and the object file uses .subsections_via_symbols,
|
||||
// then we need to emit *some* thing to the function body to prevent the
|
||||
// labels from collapsing together.
|
||||
if (MAI->hasSubsectionsViaSymbols() && !HasAnyRealCode) {
|
||||
// FIXME: EmitByte(0).
|
||||
O << "\tnop\n";
|
||||
}
|
||||
if (MAI->hasSubsectionsViaSymbols() && !HasAnyRealCode)
|
||||
OutStreamer.EmitIntValue(0, 1, 0/*addrspace*/);
|
||||
|
||||
if (MAI->hasDotTypeDotSizeDirective())
|
||||
O << "\t.size\t" << *CurrentFnSym << ", .-" << *CurrentFnSym << '\n';
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llc < %s -march=x86 | grep nop
|
||||
; RUN: llc < %s -march=x86 | grep {.byte 0}
|
||||
target triple = "i686-apple-darwin8"
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user