diff options
author | Duraid Madina <duraid@octopus.com.au> | 2005-04-02 12:21:51 +0000 |
---|---|---|
committer | Duraid Madina <duraid@octopus.com.au> | 2005-04-02 12:21:51 +0000 |
commit | 855a51974134e818232e52d63a2c3b2b48c8e244 (patch) | |
tree | c4ccb0e6bc6ca03593b3d912f0a94e6f73049bc2 /include/llvm/CodeGen | |
parent | 75c9fcbdcc414c271d7a030ffb9dfaa0e3ba5a7b (diff) | |
download | external_llvm-855a51974134e818232e52d63a2c3b2b48c8e244.zip external_llvm-855a51974134e818232e52d63a2c3b2b48c8e244.tar.gz external_llvm-855a51974134e818232e52d63a2c3b2b48c8e244.tar.bz2 |
add support for prefix/suffix strings to go around GlobalValue(s)
(which may or be function pointers) in the asmprinter. For the moment,
this changes nothing, except the IA64 backend which can use this to write:
data8.ua @fptr(blah__blah__mangled_function_name)
(by setting FunctionAddrPrefix/Suffix to "@fptr(" / ")")
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21024 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/AsmPrinter.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h index 39f309e..f31b791 100644 --- a/include/llvm/CodeGen/AsmPrinter.h +++ b/include/llvm/CodeGen/AsmPrinter.h @@ -54,6 +54,21 @@ namespace llvm { /// onto all global symbols. This is often used for "_" or ".". const char *GlobalPrefix; // Defaults to "" + /// GlobalVarAddrPrefix/Suffix - If these are nonempty, these strings + /// will enclose any GlobalVariable (that isn't a function) + /// + const char *GlobalVarAddrPrefix; // Defaults to "" + const char *GlobalVarAddrSuffix; // Defaults to "" + + /// FunctionAddrPrefix/Suffix - If these are nonempty, these strings + /// will enclose any GlobalVariable that points to a function. + /// For example, this is used by the IA64 backend to materialize + /// function descriptors, by decorating the ".data8" object with the + /// @fptr( ) link-relocation operator. + /// + const char *FunctionAddrPrefix; // Defaults to "" + const char *FunctionAddrSuffix; // Defaults to "" + /// ZeroDirective - this should be set to the directive used to get some /// number of zero bytes emitted to the current section. Common cases are /// "\t.zero\t" and "\t.space\t". If this is set to null, the @@ -87,6 +102,10 @@ namespace llvm { : O(o), TM(tm), CommentString("#"), GlobalPrefix(""), + GlobalVarAddrPrefix(""), + GlobalVarAddrSuffix(""), + FunctionAddrPrefix(""), + FunctionAddrSuffix(""), ZeroDirective("\t.zero\t"), AsciiDirective("\t.ascii\t"), Data8bitsDirective("\t.byte\t"), |