diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-28 01:58:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-28 01:58:58 +0000 |
commit | edfe776ac29d9fd48ae8967f6742400aad65e39c (patch) | |
tree | ea57d2e90e755ff0e2e947e7f63ac8b6b33f7075 /lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | 5fef8bc1cbcdf70c241ebeb0626849cecd412980 (diff) |
add target hooks for emitting random gunk before and after the function body.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94732 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index e97e9bd251..36aa748426 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -344,6 +344,9 @@ void AsmPrinter::EmitFunctionEntryLabel() { /// EmitFunctionBody - This method emits the body and trailer for a /// function. void AsmPrinter::EmitFunctionBody() { + // Emit target-specific gunk before the function body. + EmitFunctionBodyStart(); + // Print out code for the function. bool HasAnyRealCode = false; for (MachineFunction::const_iterator I = MF->begin(), E = MF->end(); @@ -378,6 +381,9 @@ void AsmPrinter::EmitFunctionBody() { if (MAI->hasSubsectionsViaSymbols() && !HasAnyRealCode) OutStreamer.EmitIntValue(0, 1, 0/*addrspace*/); + // Emit target-specific gunk after the function body. + EmitFunctionBodyEnd(); + if (MAI->hasDotTypeDotSizeDirective()) O << "\t.size\t" << *CurrentFnSym << ", .-" << *CurrentFnSym << '\n'; |