From: Chris Lattner Date: Sat, 20 Nov 2004 03:43:50 +0000 (+0000) Subject: Add the getRelocationType method that I forgot X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fab11a711021768cd3cf30f699bf4adf26fdaccf;p=oota-llvm.git Add the getRelocationType method that I forgot git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18033 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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. ///