- 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
Fixed code that was not checked before on windows for me, because of testcases that are
disabled on that platform atm.
Inital commit message:
"[ELF] - Versionscript: do not treat non-wildcarded names as wildcards."
Previously we incorrectly handled cases when symbol name in extern c++ tag
was enclosed in quotes. Next case was treated as wildcard:
GLIBCXX_3.4 {
extern "C++" {
"aaa*"
}
But it should have not. Quotes around aaa here means that we should have do exact
name matching.
That is PR30268 which has name with pointer is interpreted as wildcard by lld:
extern "C++" {
"operator delete[](void*)";
Patch fixes the issue.
Differential revision: https://reviews.llvm.org/D24229
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@281049 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed code that was not checked by testcases that are disabled on windows.
Inital commit message:
"[ELF] - Versionscript: do not treat non-wildcarded names as wildcards."
Previously we incorrectly handled cases when symbol name in extern c++ tag
was enclosed in quotes. Next case was treated as wildcard:
GLIBCXX_3.4 {
extern "C++" {
"aaa*"
}
But it should have not. Quotes around aaa here means that we should have do exact
name matching.
That is PR30268 which has name with pointer is interpreted as wildcard by lld:
extern "C++" {
"operator delete[](void*)";
Patch fixes the issue.
Differential revision: https://reviews.llvm.org/D24229
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@281045 91177308-0d34-0410-b5e6-96231b3b80d8
Previously we incorrectly handled cases when symbol name in extern c++ tag
was enclosed in quotes. Next case was treated as wildcard:
GLIBCXX_3.4 {
extern "C++" {
"aaa*"
}
But it should have not. Quotes around aaa here means that we should have do exact
name matching.
That is PR30268 which has name with pointer is interpreted as wildcard by lld:
extern "C++" {
"operator delete[](void*)";
Patch fixes the issue.
Differential revision: https://reviews.llvm.org/D24229
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@281038 91177308-0d34-0410-b5e6-96231b3b80d8
GNU ld supports [chars] wildcards in version scripts, to match a single instance of any of the chars.
Here is an extern example from libstdc++'s version script in FreeBSD:
extern "C++"
{
...
std::locale::_[T-Za-z]*;
std::[A-Zm]*;
std::n[^u]*;
std::nu[^m]*;
std::num[^e]*;
...
}
Patch adds support for scripts above. This is PR29093.
Differential revision: https://reviews.llvm.org/D23803
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@280799 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
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