[lld] r277090 - Simplify. readAssignment never returns a nullptr.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 28 17:29:26 PDT 2016
Author: ruiu
Date: Thu Jul 28 19:29:25 2016
New Revision: 277090
URL: http://llvm.org/viewvc/llvm-project?rev=277090&view=rev
Log:
Simplify. readAssignment never returns a nullptr.
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=277090&r1=277089&r2=277090&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Thu Jul 28 19:29:25 2016
@@ -779,10 +779,9 @@ void ScriptParser::readOutputSectionDesc
void ScriptParser::readProvide(bool Hidden) {
expect("(");
- if (SymbolAssignment *Assignment = readAssignment(next())) {
- Assignment->Provide = true;
- Assignment->Hidden = Hidden;
- }
+ SymbolAssignment *Cmd = readAssignment(next());
+ Cmd->Provide = true;
+ Cmd->Hidden = Hidden;
expect(")");
expect(";");
}
More information about the llvm-commits
mailing list