Fix 32 bit build in c++11 mode.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 23 May 2013 13:22:30 +0000 (13:22 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 23 May 2013 13:22:30 +0000 (13:22 +0000)
The error was:
error: non-constant-expression cannot be narrowed from type 'long long' to 'long' in initializer list [-Wc++11-narrowing]
        MI.getOperand(6).getImm() & 0x1F,

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

lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp

index 8b8637b0176048434674c8f0d926781801f334b2..4d6c25c190bdc3e288ace40b42047cb6b756e8c2 100644 (file)
@@ -113,7 +113,7 @@ void R600MCCodeEmitter::EncodeInstruction(const MCInst &MI, raw_ostream &OS,
         MI.getOperand(4).getImm(),
         MI.getOperand(5).getImm()
       };
-      long Offsets[3] = {
+      int64_t Offsets[3] = {
         MI.getOperand(6).getImm() & 0x1F,
         MI.getOperand(7).getImm() & 0x1F,
         MI.getOperand(8).getImm() & 0x1F