Make ScriptParser::read* functions more functional style.
authorRui Ueyama <ruiu@google.com>
Thu, 4 Aug 2016 02:03:27 +0000 (02:03 +0000)
committerRui Ueyama <ruiu@google.com>
Thu, 4 Aug 2016 02:03:27 +0000 (02:03 +0000)
commit104165643ee017aa38b620d96ee2bb808293ab45
treef3a65165bbb63601731849d1209a8e4187984ca9
parent70ffe6523f1b94c134fcc8d285ee58eeb574dd9f
Make ScriptParser::read* functions more functional style.

Previously, many read* functions created new command objects and
add them directly to the top-level data structure. This is not
work for some commands because some commands, such as the assignment,
can appear inside and outside of the output section description.

This patch is to not append objects to the top-level data structure.
Callers are now responsible to do that.

llvm-svn: 277686
lld/ELF/LinkerScript.cpp