diff options
author | Davide Italiano <davide@freebsd.org> | 2015-10-12 21:08:41 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2015-10-12 21:08:41 +0000 |
commit | 6836c6182d3f956001ed2f70557ea34b0353670f (patch) | |
tree | d9902558553ad82b016f8c2071a0e074bdc3a332 /lld/ELF/LinkerScript.cpp | |
parent | 2c072af95eafa6ac1749cf0b1c217b54bffb6746 (diff) | |
download | bcm5719-llvm-6836c6182d3f956001ed2f70557ea34b0353670f.tar.gz bcm5719-llvm-6836c6182d3f956001ed2f70557ea34b0353670f.zip |
[ELF2/LinkerScript] Fix OUTPUT_FORMAT directive parsing
Differential Revision: http://reviews.llvm.org/D13668
llvm-svn: 250106
Diffstat (limited to 'lld/ELF/LinkerScript.cpp')
-rw-r--r-- | lld/ELF/LinkerScript.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index f255da3527f..4d05e10f7e4 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -212,6 +212,14 @@ void LinkerScript::readOutputFormat() { // Error checking only for now. expect("("); next(); + StringRef Tok = next(); + if (Tok == ")") + return; + if (Tok != ",") + error("unexpected token: " + Tok); + next(); + expect(","); + next(); expect(")"); } |