[llvm-branch-commits] [llvm-branch] r134001 - /llvm/branches/type-system-rewrite/lib/VMCore/Type.cpp

Jay Foad jay.foad at gmail.com
Tue Jun 28 03:28:07 PDT 2011


Author: foad
Date: Tue Jun 28 05:28:07 2011
New Revision: 134001

URL: http://llvm.org/viewvc/llvm-project?rev=134001&view=rev
Log:
Use const_cast to fix a warning.

Modified:
    llvm/branches/type-system-rewrite/lib/VMCore/Type.cpp

Modified: llvm/branches/type-system-rewrite/lib/VMCore/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/type-system-rewrite/lib/VMCore/Type.cpp?rev=134001&r1=134000&r2=134001&view=diff
==============================================================================
--- llvm/branches/type-system-rewrite/lib/VMCore/Type.cpp (original)
+++ llvm/branches/type-system-rewrite/lib/VMCore/Type.cpp Tue Jun 28 05:28:07 2011
@@ -458,8 +458,8 @@
 // FIXME: Remove this version.
 StructType *StructType::get(LLVMContext &Context, ArrayRef<const Type*>Elements,
                             bool isPacked) {
-  return get(Context, ArrayRef<Type*>((Type**)Elements.data(), Elements.size()),
-             isPacked);
+  return get(Context, ArrayRef<Type*>(const_cast<Type**>(Elements.data()),
+             Elements.size()), isPacked);
 }
 
 StructType *StructType::get(LLVMContext &Context, bool isPacked) {





More information about the llvm-branch-commits mailing list