Delay computation of IsAbsolute.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 31 Oct 2016 19:56:37 +0000 (19:56 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 31 Oct 2016 19:56:37 +0000 (19:56 +0000)
commit2f831dcafd98f068e0af3029545e0465db14c989
treed9071f6c0482aa7fbb21932a7b2fc268330d6d49
parent60bdfe5a7c712f240cba53b7f1803e78ad1edfef
Delay computation of IsAbsolute.

We parse linker scripts very early, but whether an expression is
absolute or not can depend on a symbol defined in a .o. Given that, we
have to delay the computation of IsAbsolute. We can do that by storing
an AST when parsing or by also making IsAbsolute a function like we do
for the expression value. This patch implements the second option.

llvm-svn: 285628
lld/ELF/LinkerScript.cpp
lld/ELF/LinkerScript.h
lld/test/ELF/linkerscript/absolute-expr.s