OSDN Git Service

Fix the build in c++11 mode.
authorRafael Espindola <rafael.espindola@gmail.com>
Fri, 17 May 2013 22:45:52 +0000 (22:45 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Fri, 17 May 2013 22:45:52 +0000 (22:45 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182168 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp

index 59f717a..d93eb1c 100644 (file)
@@ -107,13 +107,13 @@ void R600MCCodeEmitter::EncodeInstruction(const MCInst &MI, raw_ostream &OS,
   } 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