summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/PseudoSourceValue.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-02 19:17:04 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-02 19:17:04 +0000
commitb915e9e0fc85ba6f398b3fab0db6a81a8913af94 (patch)
tree98b8f811c7aff2547cab8642daf372d6c59502fb /include/llvm/CodeGen/PseudoSourceValue.h
parent6421cca32f69ac849537a3cff78c352195e99f1b (diff)
Notes
Diffstat (limited to 'include/llvm/CodeGen/PseudoSourceValue.h')
-rw-r--r--include/llvm/CodeGen/PseudoSourceValue.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/PseudoSourceValue.h b/include/llvm/CodeGen/PseudoSourceValue.h
index c3f6fde9fb3fa..681ccb4b997cb 100644
--- a/include/llvm/CodeGen/PseudoSourceValue.h
+++ b/include/llvm/CodeGen/PseudoSourceValue.h
@@ -42,7 +42,8 @@ public:
ConstantPool,
FixedStack,
GlobalValueCallEntry,
- ExternalSymbolCallEntry
+ ExternalSymbolCallEntry,
+ TargetCustom
};
private:
@@ -67,6 +68,9 @@ public:
bool isGOT() const { return Kind == GOT; }
bool isConstantPool() const { return Kind == ConstantPool; }
bool isJumpTable() const { return Kind == JumpTable; }
+ unsigned getTargetCustom() const {
+ return (Kind >= TargetCustom) ? ((Kind+1) - TargetCustom) : 0;
+ }
/// Test whether the memory pointed to by this PseudoSourceValue has a
/// constant value.