Add a comment about subtracting two non abs symbols. NFC.

llvm-svn: 321458
This commit is contained in:
Rafael Espindola
2017-12-26 18:11:14 +00:00
parent d1c3dd89a6
commit 63a4a98e4c

View File

@@ -151,6 +151,7 @@ static ExprValue add(ExprValue A, ExprValue B) {
}
static ExprValue sub(ExprValue A, ExprValue B) {
// The distance between two symbols in sections is absolute.
if (!A.isAbsolute() && !B.isAbsolute())
return A.getValue() - B.getValue();
return {A.Sec, false, A.getSectionOffset() - B.getValue(), A.Loc};