[llvm] r232056 - make an array of constants explicitly const

Sanjay Patel spatel at rotateright.com
Thu Mar 12 09:29:58 PDT 2015


Author: spatel
Date: Thu Mar 12 11:29:58 2015
New Revision: 232056

URL: http://llvm.org/viewvc/llvm-project?rev=232056&view=rev
Log:
make an array of constants explicitly const

Suggested by Craig Topper in D8184.

This goes with r232047.


Modified:
    llvm/trunk/lib/IR/AutoUpgrade.cpp

Modified: llvm/trunk/lib/IR/AutoUpgrade.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AutoUpgrade.cpp?rev=232056&r1=232055&r2=232056&view=diff
==============================================================================
--- llvm/trunk/lib/IR/AutoUpgrade.cpp (original)
+++ llvm/trunk/lib/IR/AutoUpgrade.cpp Thu Mar 12 11:29:58 2015
@@ -568,7 +568,7 @@ void llvm::UpgradeIntrinsicCall(CallInst
           CI->getArgOperand(0),
           PointerType::getUnqual(VectorType::get(Type::getInt64Ty(C), 2)));
       Value *Load = Builder.CreateLoad(Op);
-      int Idxs[4] = { 0, 1, 0, 1 };
+      const int Idxs[4] = { 0, 1, 0, 1 };
       Rep = Builder.CreateShuffleVector(Load, UndefValue::get(Load->getType()),
                                         Idxs);
     } else if (Name == "llvm.x86.sse2.psll.dq") {





More information about the llvm-commits mailing list