diff options
author | Hal Finkel <hfinkel@anl.gov> | 2012-02-22 21:11:47 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2012-02-22 21:11:47 +0000 |
commit | d55a2664f9493a4c3be242a75d339fac0ebe2e21 (patch) | |
tree | 9d8ab0c9cdcdc7648633e9e839c955c503ad73ef /include/llvm/CodeGen/AsmPrinter.h | |
parent | 13b151c111de2dbd37aea7cdf1ca46d78073e066 (diff) | |
download | external_llvm-d55a2664f9493a4c3be242a75d339fac0ebe2e21.zip external_llvm-d55a2664f9493a4c3be242a75d339fac0ebe2e21.tar.gz external_llvm-d55a2664f9493a4c3be242a75d339fac0ebe2e21.tar.bz2 |
Allow the use of an alternate symbol for calculating a function's size.
The standard function epilog includes a .size directive, but ppc64 uses
an alternate local symbol to tag the actual start of each function.
Until recently, binutils accepted the .size directive as:
.size test1, .Ltmp0-test1
however, using this directive with recent binutils will result in the error:
.size expression for XXX does not evaluate to a constant
so we must use the label which actually tags the start of the function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151200 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/AsmPrinter.h')
-rw-r--r-- | include/llvm/CodeGen/AsmPrinter.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h index 8e64ee1..56a87f1 100644 --- a/include/llvm/CodeGen/AsmPrinter.h +++ b/include/llvm/CodeGen/AsmPrinter.h @@ -88,6 +88,11 @@ namespace llvm { /// MCSymbol *CurrentFnSym; + /// The symbol used to represent the start of the current function for the + /// purpose of calculating its size (e.g. using the .size directive). By + /// default, this is equal to CurrentFnSym. + MCSymbol *CurrentFnSymForSize; + private: // GCMetadataPrinters - The garbage collection metadata printer table. void *GCMetadataPrinters; // Really a DenseMap. |