diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-27 07:21:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-27 07:21:55 +0000 |
commit | 2cf7251d39f28888af06b6f941eabd1d10995382 (patch) | |
tree | c778df82bc04ca32a36a2fd8e699ac88459fe67d /lib/CodeGen | |
parent | ed240c474d57e4b591c6193767b8acc8b6e87517 (diff) |
add a new AsmPrinter::EmitFunctionEntryLabel virtual function,
which allows targets to override function entry label emission.
Use it to convert linux/ppc to use EmitFunctionHeader().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94667 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 8c9b0f1a89..fd29937eb0 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -313,8 +313,11 @@ void AsmPrinter::EmitFunctionHeader() { /*PrintType=*/false, F->getParent()); OutStreamer.GetCommentOS() << '\n'; } - OutStreamer.EmitLabel(CurrentFnSym); + // Emit the CurrentFnSym. This is is a virtual function to allow targets to + // do their wild and crazy things as required. + EmitFunctionEntryLabel(); + // Add some workaround for linkonce linkage on Cygwin\MinGW. if (MAI->getLinkOnceDirective() != 0 && (F->hasLinkOnceLinkage() || F->hasWeakLinkage())) @@ -326,7 +329,11 @@ void AsmPrinter::EmitFunctionHeader() { DW->BeginFunction(MF); } - +/// EmitFunctionEntryLabel - Emit the label that is the entrypoint for the +/// function. This can be overridden by targets as required to do custom stuff. +void AsmPrinter::EmitFunctionEntryLabel() { + OutStreamer.EmitLabel(CurrentFnSym); +} bool AsmPrinter::doFinalization(Module &M) { |