[llvm-commits] CVS: llvm/include/llvm/CodeGen/AsmPrinter.h

Duraid Madina duraid at octopus.com.au
Sat Apr 2 04:22:02 PST 2005



Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.10 -> 1.11
---
Log message:

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(" / ")")



---
Diffs of the changes:  (+19 -0)

 AsmPrinter.h |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.10 llvm/include/llvm/CodeGen/AsmPrinter.h:1.11
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.10	Sat Jan  8 13:57:49 2005
+++ llvm/include/llvm/CodeGen/AsmPrinter.h	Sat Apr  2 06:21:51 2005
@@ -54,6 +54,21 @@
     /// 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 @@
       : O(o), TM(tm),
         CommentString("#"),
         GlobalPrefix(""),
+	GlobalVarAddrPrefix(""),
+	GlobalVarAddrSuffix(""),
+	FunctionAddrPrefix(""),
+	FunctionAddrSuffix(""),
         ZeroDirective("\t.zero\t"),
         AsciiDirective("\t.ascii\t"),
         Data8bitsDirective("\t.byte\t"),






More information about the llvm-commits mailing list