aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineInstrBuilder.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-10-15 04:38:41 +0000
committerChris Lattner <sabre@nondot.org>2004-10-15 04:38:41 +0000
commitca4f6ebefc4dc55d13a0182a0be5b02e92fc63ea (patch)
treea8a9a28f335d98e02b9ac6363244f19cec33121e /include/llvm/CodeGen/MachineInstrBuilder.h
parent47eb6567e22ecf87ebeabc566fac6c02c975a9a4 (diff)
Allow machine operands to represent global variables with offsets. This is
useful when you have a reference like: int A[100]; void foo() { A[10] = 1; } In this case, &A[10] is a single constant and should be treated as such. Only MO_GlobalAddress and MO_ExternalSymbol are allowed to use this field, no other operand type is. This is another fine patch contributed by Jeff Cohen!! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17007 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstrBuilder.h')
-rw-r--r--include/llvm/CodeGen/MachineInstrBuilder.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/MachineInstrBuilder.h b/include/llvm/CodeGen/MachineInstrBuilder.h
index eb00ede9ef..12ca1b4998 100644
--- a/include/llvm/CodeGen/MachineInstrBuilder.h
+++ b/include/llvm/CodeGen/MachineInstrBuilder.h
@@ -124,8 +124,8 @@ public:
}
const MachineInstrBuilder &addGlobalAddress(GlobalValue *GV,
- bool isPCRelative = false) const {
- MI->addGlobalAddressOperand(GV, isPCRelative);
+ bool isPCRelative = false, int Offset = 0) const {
+ MI->addGlobalAddressOperand(GV, isPCRelative, Offset);
return *this;
}