aboutsummaryrefslogtreecommitdiff
path: root/deps/lld/ELF/ScriptLexer.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-03-20 13:34:07 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-03-20 13:34:07 -0400
commit3c7555cb679492f3f1c0ce320cbdf4a3769e56db (patch)
tree6a59ff4cd7d7e27e8d066fb3d3e07be6dffa012b /deps/lld/ELF/ScriptLexer.cpp
parent2fdf69bc4082c49a571c0ee7bb7441d910def795 (diff)
parent1b25dcde9691835d0c3f5449f4c9565b9074de0e (diff)
downloadzig-3c7555cb679492f3f1c0ce320cbdf4a3769e56db.tar.gz
zig-3c7555cb679492f3f1c0ce320cbdf4a3769e56db.zip
Merge remote-tracking branch 'origin/llvm8'
Diffstat (limited to 'deps/lld/ELF/ScriptLexer.cpp')
-rw-r--r--deps/lld/ELF/ScriptLexer.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/deps/lld/ELF/ScriptLexer.cpp b/deps/lld/ELF/ScriptLexer.cpp
index d4b1f6d99c..9a372c6d1c 100644
--- a/deps/lld/ELF/ScriptLexer.cpp
+++ b/deps/lld/ELF/ScriptLexer.cpp
@@ -244,6 +244,15 @@ StringRef ScriptLexer::peek() {
return Tok;
}
+StringRef ScriptLexer::peek2() {
+ skip();
+ StringRef Tok = next();
+ if (errorCount())
+ return "";
+ Pos = Pos - 2;
+ return Tok;
+}
+
bool ScriptLexer::consume(StringRef Tok) {
if (peek() == Tok) {
skip();