[llvm-commits] [llvm-gcc-4.2] r134895 - in /llvm-gcc-4.2/trunk/gcc/config: mips/llvm-mips.cpp rs6000/llvm-rs6000.cpp rs6000/rs6000.h

Jay Foad jay.foad at gmail.com
Mon Jul 11 04:35:40 PDT 2011


Author: foad
Date: Mon Jul 11 06:35:40 2011
New Revision: 134895

URL: http://llvm.org/viewvc/llvm-project?rev=134895&view=rev
Log:
De-constify LLVM Types enough to fix mips and rs6000 builds.

Modified:
    llvm-gcc-4.2/trunk/gcc/config/mips/llvm-mips.cpp
    llvm-gcc-4.2/trunk/gcc/config/rs6000/llvm-rs6000.cpp
    llvm-gcc-4.2/trunk/gcc/config/rs6000/rs6000.h

Modified: llvm-gcc-4.2/trunk/gcc/config/mips/llvm-mips.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/mips/llvm-mips.cpp?rev=134895&r1=134894&r2=134895&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/mips/llvm-mips.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/config/mips/llvm-mips.cpp Mon Jul 11 06:35:40 2011
@@ -67,7 +67,7 @@
   const Type *Ty = ConvertType(type);
 
   const StructType *STy = cast<StructType>(Ty);
-  std::vector<const Type *> ElementTypes;
+  std::vector<Type *> ElementTypes;
 
   // Special handling for _Complex.
   if (llvm_mips_should_not_return_complex_in_memory(type)) {

Modified: llvm-gcc-4.2/trunk/gcc/config/rs6000/llvm-rs6000.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/rs6000/llvm-rs6000.cpp?rev=134895&r1=134894&r2=134895&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/rs6000/llvm-rs6000.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/config/rs6000/llvm-rs6000.cpp Mon Jul 11 06:35:40 2011
@@ -391,7 +391,7 @@
   return false;
 }
 
-static unsigned count_num_registers_uses(std::vector<const Type*> &ScalarElts) {
+static unsigned count_num_registers_uses(std::vector<Type*> &ScalarElts) {
   unsigned NumGPRs = 0;
   for (unsigned i = 0, e = ScalarElts.size(); i != e; ++i) {
     if (NumGPRs >= 8)
@@ -423,7 +423,7 @@
 /// arguments are always passed in general purpose registers, never in
 /// Floating-point registers or vector registers.
 bool llvm_rs6000_try_pass_aggregate_custom(tree type,
-					   std::vector<const Type*> &ScalarElts,
+					   std::vector<Type*> &ScalarElts,
 					   const CallingConv::ID &CC,
 					   struct DefaultABIClient* C) {
   if (!isSVR4ABI())
@@ -432,8 +432,8 @@
   // Eight GPR's are availabe for parameter passing.
   const unsigned NumArgRegs = 8;
   unsigned NumGPR = count_num_registers_uses(ScalarElts);
-  const Type *Ty = ConvertType(type);
-  const Type* Int32Ty = Type::getInt32Ty(getGlobalContext());
+  Type *Ty = ConvertType(type);
+  Type* Int32Ty = Type::getInt32Ty(getGlobalContext());
   if (Ty->isSingleValueType()) {
     if (Ty->isIntegerTy()) {
       unsigned TypeSize = Ty->getPrimitiveSizeInBits();
@@ -469,7 +469,7 @@
   if (TREE_CODE(type) == COMPLEX_TYPE) {
     unsigned SrcSize = int_size_in_bytes(type);
     unsigned NumRegs = (SrcSize + 3) / 4;
-    std::vector<const Type*> Elts;
+    std::vector<Type*> Elts;
 
     // This looks very strange, but matches the old code.
     if (SrcSize == 8) {
@@ -505,7 +505,7 @@
 
 /* Target hook for llvm-abi.h. It returns true if an aggregate of the
    specified type should be passed using the byval mechanism. */
-bool llvm_rs6000_should_pass_aggregate_byval(tree TreeType, const Type *Ty) {
+bool llvm_rs6000_should_pass_aggregate_byval(tree TreeType, Type *Ty) {
   /* FIXME byval not implemented for ppc64. */
   if (TARGET_64BIT)
     return false;

Modified: llvm-gcc-4.2/trunk/gcc/config/rs6000/rs6000.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/rs6000/rs6000.h?rev=134895&r1=134894&r2=134895&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/rs6000/rs6000.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/rs6000/rs6000.h Mon Jul 11 06:35:40 2011
@@ -3490,14 +3490,14 @@
 #ifdef LLVM_ABI_H
 
 extern bool llvm_rs6000_try_pass_aggregate_custom(tree,
-						  std::vector<const Type*>&,
+						  std::vector<Type*>&,
 						  const CallingConv::ID &,
 						  struct DefaultABIClient*);
 
 #define LLVM_TRY_PASS_AGGREGATE_CUSTOM(T, E, CC, C)	\
   llvm_rs6000_try_pass_aggregate_custom((T), (E), (CC), (C))
 
-extern bool llvm_rs6000_should_pass_aggregate_byval(tree, const Type *);
+extern bool llvm_rs6000_should_pass_aggregate_byval(tree, Type *);
 
 #define LLVM_SHOULD_PASS_AGGREGATE_USING_BYVAL_ATTR(X, TY, CC)     \
   llvm_rs6000_should_pass_aggregate_byval((X), (TY))
@@ -3508,8 +3508,8 @@
 #define LLVM_SHOULD_PASS_VECTOR_IN_INTEGER_REGS(X)            \
   llvm_rs6000_should_pass_vector_in_integer_regs((X))
 
-extern bool llvm_rs6000_should_pass_aggregate_in_mixed_regs(tree, const Type*, 
-                                              std::vector<const Type*>&);
+extern bool llvm_rs6000_should_pass_aggregate_in_mixed_regs(tree, Type*, 
+                                              std::vector<Type*>&);
 
 /* FIXME this is needed for 64-bit  */
 #define LLVM_SHOULD_PASS_AGGREGATE_IN_MIXED_REGS(T, TY, CC, E) \





More information about the llvm-commits mailing list