//===-- CodeGen/MachineInstBuilder.h - Simplify creation of MIs -*- C++ -*-===//
-//
+//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
+//
//===----------------------------------------------------------------------===//
//
// This file exposes a function named BuildMI, which is useful for dramatically
MI->addMachineRegOperand(Reg, Ty);
return *this;
}
-
+
/// addImm - Add a new immediate operand.
///
const MachineInstrBuilder &addImm(int Val) const {
return *this;
}
- const MachineInstrBuilder &addConstantPoolIndex(unsigned Idx) const {
- MI->addConstantPoolIndexOperand(Idx);
+ const MachineInstrBuilder &addConstantPoolIndex(unsigned Idx,
+ int Offset = 0) const {
+ MI->addConstantPoolIndexOperand(Idx, Offset);
return *this;
}
const MachineInstrBuilder &addGlobalAddress(GlobalValue *GV,
- bool isPCRelative = false, int Offset = 0) const {
+ bool isPCRelative = false,
+ int Offset = 0) const {
MI->addGlobalAddressOperand(GV, isPCRelative, Offset);
return *this;
}