diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2017-05-31 19:53:40 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2017-05-31 19:53:40 +0000 |
| commit | d54c566510036ea478c6012658d2b582560ea98e (patch) | |
| tree | 2acb9937ef8ba09a1cf03efddc438dfc5a6cd741 | |
| parent | 2e98c045cb76f0c336cd4e38251d178661b23988 (diff) | |
| download | bcm5719-llvm-d54c566510036ea478c6012658d2b582560ea98e.tar.gz bcm5719-llvm-d54c566510036ea478c6012658d2b582560ea98e.zip | |
Simplify. NFC.
llvm-svn: 304334
| -rw-r--r-- | lld/ELF/LinkerScript.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 5ebb9f3b3d8..798f1947ba4 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -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"); } |

