[lld] r265236 - Do not return early.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 2 11:52:24 PDT 2016
Author: ruiu
Date: Sat Apr 2 13:52:23 2016
New Revision: 265236
URL: http://llvm.org/viewvc/llvm-project?rev=265236&view=rev
Log:
Do not return early.
Early return in this context is a bit confusing, so avoid doing it.
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=265236&r1=265235&r2=265236&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Sat Apr 2 13:52:23 2016
@@ -174,17 +174,16 @@ static void checkOptions(opt::InputArgLi
if (Config->Pie && Config->Shared)
error("-shared and -pie may not be used together");
- if (!Config->Relocatable)
- return;
-
- if (Config->Shared)
- error("-r and -shared may not be used together");
- if (Config->GcSections)
- error("-r and --gc-sections may not be used together");
- if (Config->ICF)
- error("-r and --icf may not be used together");
- if (Config->Pie)
- error("-r and -pie may not be used together");
+ if (Config->Relocatable) {
+ if (Config->Shared)
+ error("-r and -shared may not be used together");
+ if (Config->GcSections)
+ error("-r and --gc-sections may not be used together");
+ if (Config->ICF)
+ error("-r and --icf may not be used together");
+ if (Config->Pie)
+ error("-r and -pie may not be used together");
+ }
}
static StringRef
More information about the llvm-commits
mailing list