[llvm-commits] CVS: llvm/include/llvm/Target/TargetAsmInfo.h

Chris Lattner sabre at nondot.org
Mon Sep 25 20:38:38 PDT 2006



Changes in directory llvm/include/llvm/Target:

TargetAsmInfo.h updated: 1.4 -> 1.5
---
Log message:

Add support for targets that want to do something with the llvm.used list,
because they have an aggressive linker that does dead code stripping.


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

 TargetAsmInfo.h |    8 ++++++++
 1 files changed, 8 insertions(+)


Index: llvm/include/llvm/Target/TargetAsmInfo.h
diff -u llvm/include/llvm/Target/TargetAsmInfo.h:1.4 llvm/include/llvm/Target/TargetAsmInfo.h:1.5
--- llvm/include/llvm/Target/TargetAsmInfo.h:1.4	Mon Sep 25 17:38:36 2006
+++ llvm/include/llvm/Target/TargetAsmInfo.h	Mon Sep 25 22:38:18 2006
@@ -199,6 +199,11 @@
     /// directives, this is true for most ELF targets.
     bool HasDotTypeDotSizeDirective;      // Defaults to true.
     
+    /// UsedDirective - This directive, if non-null, is used to declare a global
+    /// as being used somehow that the assembler can't see.  This prevents dead
+    /// code elimination on some targets.
+    const char *UsedDirective;            // Defaults to null.
+    
     //===--- Dwarf Emission Directives -----------------------------------===//
 
     /// HasLEB128 - True if target asm supports leb128 directives.
@@ -387,6 +392,9 @@
     bool hasDotTypeDotSizeDirective() const {
       return HasDotTypeDotSizeDirective;
     }
+    const char *getUsedDirective() const {
+      return UsedDirective;
+    }
     bool hasLEB128() const {
       return HasLEB128;
     }






More information about the llvm-commits mailing list