Simplify. NFC.

llvm-svn: 304334
This commit is contained in:
Rafael Espindola 2017-05-31 19:53:40 +00:00
parent 2e98c045cb
commit d54c566510
1 changed files with 2 additions and 3 deletions

View File

@ -51,9 +51,8 @@ LinkerScript *elf::Script;
uint64_t ExprValue::getValue() const {
if (Sec) {
if (Sec->getOutputSection())
return alignTo(Sec->getOffset(Val) + Sec->getOutputSection()->Addr,
Alignment);
if (OutputSection *OS = Sec->getOutputSection())
return alignTo(Sec->getOffset(Val) + OS->Addr, Alignment);
error("unable to evaluate expression: input section " + Sec->Name +
" has no output section assigned");
}