Fix bug in -nostdlib.
We still have to skip a token inside SEARCH_DIR() when -nostdlib is
specified. Previuosly, we didn't skip it, so it caused a parse error.
llvm-svn: 281001
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index eeb6dc2..223218f 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -886,8 +886,9 @@
void ScriptParser::readSearchDir() {
expect("(");
+ StringRef Tok = next();
if (!Config->Nostdlib)
- Config->SearchPaths.push_back(next());
+ Config->SearchPaths.push_back(Tok);
expect(")");
}