summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Driver.cpp
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2016-03-17 04:28:41 +0000
committerDavide Italiano <davide@freebsd.org>2016-03-17 04:28:41 +0000
commit1568868044bb190156969ce17444fc3f3ef86580 (patch)
tree993c854fba7015a7dd2a16f21e16d85059ce5ba8 /lld/ELF/Driver.cpp
parent6377e4e09ada9d6d6a2dbbae0688b38f94401e2b (diff)
downloadbcm5719-llvm-1568868044bb190156969ce17444fc3f3ef86580.tar.gz
bcm5719-llvm-1568868044bb190156969ce17444fc3f3ef86580.zip
[ELF] Use braces for muti-line if(s).
Reported by: Joerg Sonnenberg. llvm-svn: 263690
Diffstat (limited to 'lld/ELF/Driver.cpp')
-rw-r--r--lld/ELF/Driver.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 0c0e31ec714..fa121548e63 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -344,14 +344,15 @@ template <class ELFT> void LinkerDriver::link(opt::InputArgList &Args) {
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::link(opt::InputArgList &Args) {
// 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).
OpenPOWER on IntegriCloud