Changes in directory llvm/include/llvm:

GlobalValue.h updated: 1.24 -> 1.25
---
Log message:

allow functions and modules to have an explicit alignment


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

 GlobalValue.h |    7 +++++++
 1 files changed, 7 insertions(+)


Index: llvm/include/llvm/GlobalValue.h
diff -u llvm/include/llvm/GlobalValue.h:1.24 
llvm/include/llvm/GlobalValue.h:1.25
--- llvm/include/llvm/GlobalValue.h:1.24        Tue Oct 25 12:59:28 2005
+++ llvm/include/llvm/GlobalValue.h     Sun Nov  6 00:44:42 2005
@@ -42,11 +42,18 @@
 
   LinkageTypes Linkage;   // The linkage of this global
   Module *Parent;
+  unsigned Alignment;
 public:
   ~GlobalValue() {
     removeDeadConstantUsers();   // remove any dead constants using this.
   }
 
+  unsigned getAlignment() const { return Alignment; }
+  void setAlignment(unsigned Align) {
+    assert((Align & (Align-1)) == 0 && "Alignment is not a power of 2!");
+    Alignment = Align;
+  }
+  
   /// If the usage is empty (except transitively dead constants), then this
   /// global value can can be safely deleted since the destructor will
   /// delete the dead constants as well.



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to