[llvm-branch-commits] [llvm-branch] r134185 - /llvm/branches/type-system-rewrite/include/llvm/Value.h

Chris Lattner sabre at nondot.org
Thu Jun 30 13:24:25 PDT 2011


Author: lattner
Date: Thu Jun 30 15:24:24 2011
New Revision: 134185

URL: http://llvm.org/viewvc/llvm-project?rev=134185&view=rev
Log:
add a horrible method to be used by the IR linker.

Modified:
    llvm/branches/type-system-rewrite/include/llvm/Value.h

Modified: llvm/branches/type-system-rewrite/include/llvm/Value.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/type-system-rewrite/include/llvm/Value.h?rev=134185&r1=134184&r2=134185&view=diff
==============================================================================
--- llvm/branches/type-system-rewrite/include/llvm/Value.h (original)
+++ llvm/branches/type-system-rewrite/include/llvm/Value.h Thu Jun 30 15:24:24 2011
@@ -304,6 +304,15 @@
   /// load, store, and alloca instructions, and global values.
   static const unsigned MaximumAlignment = 1u << 29;
   
+  /// mutateType - Mutate the type of this Value to be of the specified type.
+  /// Note that this is an extremely dangerous operation which can create
+  /// completely invalid IR very easily.  It is strongly recommended that you
+  /// recreate IR objects with the right types instead of mutating them in
+  /// place.
+  void mutateType(Type *Ty) {
+    VTy = Ty;
+  }
+  
 protected:
   unsigned short getSubclassDataFromValue() const { return SubclassData; }
   void setValueSubclassData(unsigned short D) { SubclassData = D; }





More information about the llvm-branch-commits mailing list