[lld] r263690 - [ELF] Use braces for muti-line if(s).
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 16 21:28:42 PDT 2016
Author: davide
Date: Wed Mar 16 23:28:41 2016
New Revision: 263690
URL: http://llvm.org/viewvc/llvm-project?rev=263690&view=rev
Log:
[ELF] Use braces for muti-line if(s).
Reported by: Joerg Sonnenberg.
Modified:
lld/trunk/ELF/Driver.cpp
Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=263690&r1=263689&r2=263690&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Wed Mar 16 23:28:41 2016
@@ -344,14 +344,15 @@ template <class ELFT> void LinkerDriver:
Config->Rela = ELFT::Is64Bits;
if (Config->Entry.empty() && !Config->Shared && !Config->Relocatable &&
- Config->EMachine != EM_AMDGPU)
+ Config->EMachine != EM_AMDGPU) {
// Add entry symbol.
//
// There is no entry symbol for AMDGPU binaries, so skip adding one to avoid
// having and undefined symbol.
Config->Entry = Config->EMachine == EM_MIPS ? "__start" : "_start";
+ }
- if (!Config->Relocatable)
+ if (!Config->Relocatable) {
// In the assembly for 32 bit x86 the _GLOBAL_OFFSET_TABLE_ symbol
// is magical and is used to produce a R_386_GOTPC relocation.
// The R_386_GOTPC relocation value doesn't actually depend on the
@@ -365,6 +366,7 @@ template <class ELFT> void LinkerDriver:
// Given that the symbol is effectively unused, we just create a dummy
// hidden one to avoid the undefined symbol error.
Symtab.addIgnored("_GLOBAL_OFFSET_TABLE_");
+ }
if (!Config->Entry.empty()) {
// Set either EntryAddr (if S is a number) or EntrySym (otherwise).
More information about the llvm-commits
mailing list