~ubuntu-branches/ubuntu/quantal/llvm-3.1/quantal

« back to all changes in this revision

Viewing changes to include/llvm/MC/MCRegisterInfo.h

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-04-10 23:38:33 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120410233833-5ibwguerdnr58six
Tags: 3.1~svn154439-1
* New snapshot release
* Change the soname to match what Debian is expecting
* Clean up the dh_shlibdeps call

Show diffs side-by-side

added added

removed removed

Lines of Context:
134
134
    unsigned FromReg;
135
135
    unsigned ToReg;
136
136
 
137
 
    bool operator==(unsigned Reg) const { return FromReg == Reg; }
138
 
    bool operator<(unsigned Reg) const { return FromReg < Reg; }
 
137
    bool operator<(DwarfLLVMRegPair RHS) const { return FromReg < RHS.FromReg; }
139
138
  };
140
139
private:
141
140
  const MCRegisterDesc *Desc;                 // Pointer to the descriptor array
315
314
    const DwarfLLVMRegPair *M = isEH ? EHL2DwarfRegs : L2DwarfRegs;
316
315
    unsigned Size = isEH ? EHL2DwarfRegsSize : L2DwarfRegsSize;
317
316
 
318
 
    const DwarfLLVMRegPair *I = std::lower_bound(M, M+Size, RegNum);
 
317
    DwarfLLVMRegPair Key = { RegNum, 0 };
 
318
    const DwarfLLVMRegPair *I = std::lower_bound(M, M+Size, Key);
319
319
    if (I == M+Size || I->FromReg != RegNum)
320
320
      return -1;
321
321
    return I->ToReg;
327
327
    const DwarfLLVMRegPair *M = isEH ? EHDwarf2LRegs : Dwarf2LRegs;
328
328
    unsigned Size = isEH ? EHDwarf2LRegsSize : Dwarf2LRegsSize;
329
329
 
330
 
    const DwarfLLVMRegPair *I = std::lower_bound(M, M+Size, RegNum);
 
330
    DwarfLLVMRegPair Key = { RegNum, 0 };
 
331
    const DwarfLLVMRegPair *I = std::lower_bound(M, M+Size, Key);
331
332
    assert(I != M+Size && I->FromReg == RegNum && "Invalid RegNum");
332
333
    return I->ToReg;
333
334
  }