[llvm-branch-commits] [llvm-gcc-branch] r110634 - in /llvm-gcc-4.2/branches/Apple/Pertwee: ./ gcc/llvm-convert.cpp

Bob Wilson bob.wilson at apple.com
Mon Aug 9 17:14:44 PDT 2010


Author: bwilson
Date: Mon Aug  9 19:14:44 2010
New Revision: 110634

URL: http://llvm.org/viewvc/llvm-project?rev=110634&view=rev
Log:
--- Merging r110632 into '.':
U    gcc/llvm-convert.cpp

Modified:
    llvm-gcc-4.2/branches/Apple/Pertwee/   (props changed)
    llvm-gcc-4.2/branches/Apple/Pertwee/gcc/llvm-convert.cpp

Propchange: llvm-gcc-4.2/branches/Apple/Pertwee/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Aug  9 19:14:44 2010
@@ -1 +1 @@
-/llvm-gcc-4.2/trunk:110043,110250,110459,110479,110501,110619
+/llvm-gcc-4.2/trunk:110043,110250,110459,110479,110501,110619,110632

Modified: llvm-gcc-4.2/branches/Apple/Pertwee/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Pertwee/gcc/llvm-convert.cpp?rev=110634&r1=110633&r2=110634&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Pertwee/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Pertwee/gcc/llvm-convert.cpp Mon Aug  9 19:14:44 2010
@@ -4857,6 +4857,7 @@
       const Type *LLVMTy = ConvertType(type);
 
       Value *Op = 0;
+      const Type *OpTy = LLVMTy;
       if (LLVMTy->isSingleValueType()) {
         if (TREE_CODE(Val)==ADDR_EXPR &&
             TREE_CODE(TREE_OPERAND(Val,0))==LABEL_DECL) {
@@ -4885,10 +4886,10 @@
           // Otherwise, emit our value as a lvalue.
           isIndirect = true;
           Op = LV.Ptr;
+          OpTy = Op->getType();
         }
       }
 
-      const Type *OpTy = Op->getType();
       // If this input operand is matching an output operand, e.g. '0', check if
       // this is something that llvm supports. If the operand types are
       // different, then emit an error if 1) one of the types is not integer or
@@ -4947,13 +4948,12 @@
                                                  OTyBits-OpTyBits);
               Op = Builder.CreateLShr(Op, ShAmt);
             }
-            OpTy = Op->getType();
           }
         }
       }
 
       CallOps.push_back(Op);
-      CallArgTypes.push_back(OpTy);
+      CallArgTypes.push_back(Op->getType());
     } else {                          // Memory operand.
       lang_hooks.mark_addressable(TREE_VALUE(Input));
       isIndirect = true;





More information about the llvm-branch-commits mailing list