From 30244cec4fd20e1660bf1eccc6b17324e9e89336 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Tue, 26 May 2015 20:25:30 +0000 Subject: [PATCH] Object/COFF: Add COFFSymbolRef::isAbsolute(). COFFSymbolRef has many predicates, like isCommon() or isExternal(), but this predicate was missing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238247 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Object/COFF.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/llvm/Object/COFF.h b/include/llvm/Object/COFF.h index 9664c3b03c9..b28cec48644 100644 --- a/include/llvm/Object/COFF.h +++ b/include/llvm/Object/COFF.h @@ -314,6 +314,10 @@ public: return (getType() & 0xF0) >> COFF::SCT_COMPLEX_TYPE_SHIFT; } + bool isAbsolute() const { + return getSectionNumber() == -1; + } + bool isExternal() const { return getStorageClass() == COFF::IMAGE_SYM_CLASS_EXTERNAL; } -- 2.34.1