summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineRelocation.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-11-20 03:43:50 +0000
committerChris Lattner <sabre@nondot.org>2004-11-20 03:43:50 +0000
commitfab11a711021768cd3cf30f699bf4adf26fdaccf (patch)
treeda77e5ae67dd252b316582aef9df19ed1682f9fa /include/llvm/CodeGen/MachineRelocation.h
parent9da3c56efd98cd9bf55104ca7d484728470eda6a (diff)
downloadllvm-fab11a711021768cd3cf30f699bf4adf26fdaccf.tar.gz
llvm-fab11a711021768cd3cf30f699bf4adf26fdaccf.tar.bz2
llvm-fab11a711021768cd3cf30f699bf4adf26fdaccf.tar.xz
Add the getRelocationType method that I forgot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18033 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineRelocation.h')
-rw-r--r--include/llvm/CodeGen/MachineRelocation.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineRelocation.h b/include/llvm/CodeGen/MachineRelocation.h
index 71bccad5c2..96d6c688a7 100644
--- a/include/llvm/CodeGen/MachineRelocation.h
+++ b/include/llvm/CodeGen/MachineRelocation.h
@@ -66,6 +66,12 @@ public:
return OffsetTypeExternal & ((1 << 24)-1);
}
+ /// getRelocationType - Return the target-specific relocation ID for this
+ /// relocation.
+ unsigned getRelocationType() const {
+ return OffsetTypeExternal >> 25;
+ }
+
/// getConstantVal - Get the constant value associated with this relocation.
/// This is often an offset from the symbol.
///