Skip to content

Commit

Permalink
Object/COFF: Add COFFSymbolRef::isAbsolute().
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rui314 committed May 26, 2015
1 parent 6f49135 commit 30244ce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/llvm/Object/COFF.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@ class COFFSymbolRef {
return (getType() & 0xF0) >> COFF::SCT_COMPLEX_TYPE_SHIFT;
}

bool isAbsolute() const {
return getSectionNumber() == -1;
}

bool isExternal() const {
return getStorageClass() == COFF::IMAGE_SYM_CLASS_EXTERNAL;
}
Expand Down

0 comments on commit 30244ce

Please sign in to comment.