[llvm] r182168 - Fix the build in c++11 mode.

Rafael Espindola rafael.espindola at gmail.com
Fri May 17 15:45:52 PDT 2013


Author: rafael
Date: Fri May 17 17:45:52 2013
New Revision: 182168

URL: http://llvm.org/viewvc/llvm-project?rev=182168&view=rev
Log:
Fix the build in c++11 mode.

The errors were:

non-constant-expression cannot be narrowed from type 'int64_t' (aka 'long') to 'uint32_t' (aka 'unsigned int') in initializer list

and

non-constant-expression cannot be narrowed from type 'long' to 'uint32_t' (aka 'unsigned int') in initializer list

Modified:
    llvm/trunk/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp

Modified: llvm/trunk/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp?rev=182168&r1=182167&r2=182168&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp Fri May 17 17:45:52 2013
@@ -107,13 +107,13 @@ void R600MCCodeEmitter::EncodeInstructio
   } else if (IS_TEX(Desc)) {
       int64_t Sampler = MI.getOperand(14).getImm();
 
-      uint32_t SrcSelect[4] = {
+      int64_t SrcSelect[4] = {
         MI.getOperand(2).getImm(),
         MI.getOperand(3).getImm(),
         MI.getOperand(4).getImm(),
         MI.getOperand(5).getImm()
       };
-      uint32_t Offsets[3] = {
+      long Offsets[3] = {
         MI.getOperand(6).getImm() & 0x1F,
         MI.getOperand(7).getImm() & 0x1F,
         MI.getOperand(8).getImm() & 0x1F





More information about the llvm-commits mailing list