[llvm] r238247 - Object/COFF: Add COFFSymbolRef::isAbsolute().
Rui Ueyama
ruiu at google.com
Tue May 26 13:25:30 PDT 2015
Author: ruiu
Date: Tue May 26 15:25:30 2015
New Revision: 238247
URL: http://llvm.org/viewvc/llvm-project?rev=238247&view=rev
Log:
Object/COFF: Add COFFSymbolRef::isAbsolute().
COFFSymbolRef has many predicates, like isCommon() or
isExternal(), but this predicate was missing.
Modified:
llvm/trunk/include/llvm/Object/COFF.h
Modified: llvm/trunk/include/llvm/Object/COFF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/COFF.h?rev=238247&r1=238246&r2=238247&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/COFF.h (original)
+++ llvm/trunk/include/llvm/Object/COFF.h Tue May 26 15:25:30 2015
@@ -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;
}
More information about the llvm-commits
mailing list