aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-28 01:28:58 +0000
committerChris Lattner <sabre@nondot.org>2010-01-28 01:28:58 +0000
commit1d40b3738f819d8cfb67b6b71d83642036388cd0 (patch)
tree8cd572db61902f22106a3378d405a4d9be3ff03a /lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parent8ee1b0a7fc44d8e19a3974697b1a152cb6fe7e1c (diff)
downloadexternal_llvm-1d40b3738f819d8cfb67b6b71d83642036388cd0.zip
external_llvm-1d40b3738f819d8cfb67b6b71d83642036388cd0.tar.gz
external_llvm-1d40b3738f819d8cfb67b6b71d83642036388cd0.tar.bz2
Give AsmPrinter the most common expected implementation of
runOnMachineFunction, and switch PPC to use EmitFunctionBody. The two ppc asmprinters now don't heave to define runOnMachineFunction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94722 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index e7a1286..e97e9bd 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -344,7 +344,6 @@ void AsmPrinter::EmitFunctionEntryLabel() {
/// EmitFunctionBody - This method emits the body and trailer for a
/// function.
void AsmPrinter::EmitFunctionBody() {
-
// Print out code for the function.
bool HasAnyRealCode = false;
for (MachineFunction::const_iterator I = MF->begin(), E = MF->end();
@@ -374,8 +373,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.
+ // then we need to emit *something* to the function body to prevent the
+ // labels from collapsing together. Just emit a 0 byte.
if (MAI->hasSubsectionsViaSymbols() && !HasAnyRealCode)
OutStreamer.EmitIntValue(0, 1, 0/*addrspace*/);