[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineInstrBuilder.h
Chris Lattner
lattner at cs.uiuc.edu
Sun Jan 12 18:19:00 PST 2003
Changes in directory llvm/include/llvm/CodeGen:
MachineInstrBuilder.h updated: 1.10 -> 1.11
---
Log message:
* Add support for new types of operands
---
Diffs of the changes:
Index: llvm/include/llvm/CodeGen/MachineInstrBuilder.h
diff -u llvm/include/llvm/CodeGen/MachineInstrBuilder.h:1.10 llvm/include/llvm/CodeGen/MachineInstrBuilder.h:1.11
--- llvm/include/llvm/CodeGen/MachineInstrBuilder.h:1.10 Tue Dec 24 23:01:18 2002
+++ llvm/include/llvm/CodeGen/MachineInstrBuilder.h Sun Jan 12 18:18:44 2003
@@ -18,9 +18,9 @@
#include "llvm/CodeGen/MachineInstr.h"
-struct MachineInstrBuilder {
+class MachineInstrBuilder {
MachineInstr *MI;
-
+public:
MachineInstrBuilder(MachineInstr *mi) : MI(mi) {}
/// Allow automatic conversion to the machine instruction we are working on.
@@ -89,6 +89,23 @@
const MachineInstrBuilder &addFrameIndex(unsigned Idx) const {
MI->addFrameIndexOperand(Idx);
+ return *this;
+ }
+
+ const MachineInstrBuilder &addConstantPoolIndex(unsigned Idx) const {
+ MI->addConstantPoolIndexOperand(Idx);
+ return *this;
+ }
+
+ const MachineInstrBuilder &addGlobalAddress(GlobalValue *GV,
+ bool isPCRelative = false) const {
+ MI->addGlobalAddressOperand(GV, isPCRelative);
+ return *this;
+ }
+
+ const MachineInstrBuilder &addExternalSymbol(const std::string &Name,
+ bool isPCRelative = false) const{
+ MI->addExternalSymbolOperand(Name, isPCRelative);
return *this;
}
};
More information about the llvm-commits
mailing list