aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/AsmPrinter
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
commitd49fe1b6bc4615684c2ec71140a21e9c4cd69ce3 (patch)
tree8cd572db61902f22106a3378d405a4d9be3ff03a /lib/CodeGen/AsmPrinter
parentbec487767c3e0a376eed7c37773c88d6fcc8e4d9 (diff)
downloadexternal_llvm-d49fe1b6bc4615684c2ec71140a21e9c4cd69ce3.zip
external_llvm-d49fe1b6bc4615684c2ec71140a21e9c4cd69ce3.tar.gz
external_llvm-d49fe1b6bc4615684c2ec71140a21e9c4cd69ce3.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')
-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*/);