From 1daa6f479dd5fb4123f1ffbb10a3825da7d2c6b8 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 21 Sep 2010 06:43:24 +0000 Subject: [PATCH] add some accessors git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114409 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/MachineMemOperand.h | 8 ++++++++ lib/CodeGen/MachineInstr.cpp | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/include/llvm/CodeGen/MachineMemOperand.h b/include/llvm/CodeGen/MachineMemOperand.h index 71181dfe3a3..fe934633595 100644 --- a/include/llvm/CodeGen/MachineMemOperand.h +++ b/include/llvm/CodeGen/MachineMemOperand.h @@ -56,6 +56,14 @@ struct MachinePointerInfo { /// getFixedStack - Return a MachinePointerInfo record that refers to the /// the specified FrameIndex. static MachinePointerInfo getFixedStack(int FI, int64_t offset = 0); + + /// getJumpTable - Return a MachinePointerInfo record that refers to a + /// jump table entry. + static MachinePointerInfo getJumpTable(); + + /// getGOT - Return a MachinePointerInfo record that refers to a + /// GOT entry. + static MachinePointerInfo getGOT(); }; diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index c3021eff9b1..6372c196f7d 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -354,6 +354,13 @@ MachinePointerInfo MachinePointerInfo::getFixedStack(int FI, int64_t offset) { return MachinePointerInfo(PseudoSourceValue::getFixedStack(FI), offset); } +MachinePointerInfo MachinePointerInfo::getJumpTable() { + return MachinePointerInfo(PseudoSourceValue::getJumpTable()); +} + +MachinePointerInfo MachinePointerInfo::getGOT() { + return MachinePointerInfo(PseudoSourceValue::getGOT()); +} MachineMemOperand::MachineMemOperand(MachinePointerInfo ptrinfo, unsigned f, uint64_t s, unsigned int a)