aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineJumpTableInfo.h
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-12-14 19:17:33 +0000
committerJim Laskey <jlaskey@mac.com>2006-12-14 19:17:33 +0000
commitacd80ac7bb19f8bdfa55336d567c9ecbe695c8b8 (patch)
tree5d5f6c751aed7302797b4267adb0e5598a325428 /include/llvm/CodeGen/MachineJumpTableInfo.h
parent8897a7b02e6ccd50bbcb68133e55b54ec8a2e4e0 (diff)
1. Tidy up jump table info.
2. Allow the jit to handle PIC relocable jump tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32581 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineJumpTableInfo.h')
-rw-r--r--include/llvm/CodeGen/MachineJumpTableInfo.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/MachineJumpTableInfo.h b/include/llvm/CodeGen/MachineJumpTableInfo.h
index aa2981c4bb..3da85ae21e 100644
--- a/include/llvm/CodeGen/MachineJumpTableInfo.h
+++ b/include/llvm/CodeGen/MachineJumpTableInfo.h
@@ -39,9 +39,11 @@ struct MachineJumpTableEntry {
class MachineJumpTableInfo {
const TargetData *TD;
+ unsigned EntrySize;
std::vector<MachineJumpTableEntry> JumpTables;
public:
- MachineJumpTableInfo(const TargetData *td) : TD(td) {}
+ MachineJumpTableInfo(const TargetData *td, unsigned ES)
+ : TD(td), EntrySize(ES) {}
/// getJumpTableIndex - Create a new jump table or return an existing one.
///
@@ -77,8 +79,9 @@ public:
return MadeChange;
}
- /// getEntrySize - returns the size of an individual field in a jump table
- unsigned getEntrySize() const;
+ /// getEntrySize - Returns the size of an individual field in a jump table.
+ ///
+ unsigned getEntrySize() const { return EntrySize; }
/// getAlignment - returns the target's preferred alignment for jump tables
unsigned getAlignment() const;