From fab11a711021768cd3cf30f699bf4adf26fdaccf Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 20 Nov 2004 03:43:50 +0000 Subject: [PATCH] Add the getRelocationType method that I forgot git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18033 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/MachineRelocation.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/llvm/CodeGen/MachineRelocation.h b/include/llvm/CodeGen/MachineRelocation.h index 71bccad5c25..96d6c688a77 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. ///