- Rename currentBuffer -> getCurrentMB to start it with verb.
- Simplify containsString.
- Add llvm_unreachable at end of getCurrentMB.
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@288310 91177308-0d34-0410-b5e6-96231b3b80d8
skip() and skip(StringRef) were overloaded functions that
have different semantics. This patch rename one of the functions
to avoid function overloading.
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@284396 91177308-0d34-0410-b5e6-96231b3b80d8
Most functions that return StringRef should check their return values,
so I'm planning on marking StringRef [[nodiscard]]. This requires
splitting up functions like next() that are sometimes just used for
side effects.
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@284363 91177308-0d34-0410-b5e6-96231b3b80d8
Previously, we have re-implemented utility functions such as `expect`
or `next` in LinkerScript.cpp. This patch reuses the existing
implementation that is in ScriptParser.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@267255 91177308-0d34-0410-b5e6-96231b3b80d8
ScriptParserBase class is a container of collection of various methods
to parse linker script-ish text. It had a virtual method `run` to run
the parser. But we don't have to enforce its descendents to implement
that. It's up to them.
This patch removes pure virtual function `run`.
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@267246 91177308-0d34-0410-b5e6-96231b3b80d8
This patch add a base script tokenizer class to decouple parsing from
linker script handling. The idea is to use this base class on dynamic
list parsing (--dynamic-list option). No functionality added.
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@265600 91177308-0d34-0410-b5e6-96231b3b80d8