[lld] r286802 - [ELF] - Removed unused code. NFC.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 14 02:03:55 PST 2016
Author: grimar
Date: Mon Nov 14 04:03:54 2016
New Revision: 286802
URL: http://llvm.org/viewvc/llvm-project?rev=286802&view=rev
Log:
[ELF] - Removed unused code. NFC.
This branch was unused I believe,
as Tok can never be empty.
Modified:
lld/trunk/ELF/LinkerScript.cpp
Modified: lld/trunk/ELF/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=286802&r1=286801&r2=286802&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Mon Nov 14 04:03:54 2016
@@ -1728,12 +1728,7 @@ std::vector<StringRef> ScriptParser::rea
std::vector<StringRef> Phdrs;
while (!Error && peek().startswith(":")) {
StringRef Tok = next();
- Tok = (Tok.size() == 1) ? next() : Tok.substr(1);
- if (Tok.empty()) {
- setError("section header name is empty");
- break;
- }
- Phdrs.push_back(Tok);
+ Phdrs.push_back((Tok.size() == 1) ? next() : Tok.substr(1));
}
return Phdrs;
}
More information about the llvm-commits
mailing list