summaryrefslogtreecommitdiff
path: root/lld/ELF/InputFiles.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2019-07-29 05:24:51 +0000
committerRui Ueyama <ruiu@google.com>2019-07-29 05:24:51 +0000
commitd524c17029ef3b4d13bcb00710ce9f0a9ce76942 (patch)
tree3e8468d089c8c20aed0e94f52a9d3914f3cfecc6 /lld/ELF/InputFiles.cpp
parent9aeab53eba0a63829a7f6f8ba878a257530a2dd7 (diff)
Return early. NFC.
llvm-svn: 367200
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
-rw-r--r--lld/ELF/InputFiles.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index 95a4de33cda8..c8ae3b586835 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -127,18 +127,18 @@ static bool isCompatible(InputFile *file) {
if (!config->emulation.empty()) {
error(toString(file) + " is incompatible with " + config->emulation);
- } else {
- InputFile *existing;
- if (!objectFiles.empty())
- existing = objectFiles[0];
- else if (!sharedFiles.empty())
- existing = sharedFiles[0];
- else
- existing = bitcodeFiles[0];
-
- error(toString(file) + " is incompatible with " + toString(existing));
+ return false;
}
+ InputFile *existing;
+ if (!objectFiles.empty())
+ existing = objectFiles[0];
+ else if (!sharedFiles.empty())
+ existing = sharedFiles[0];
+ else
+ existing = bitcodeFiles[0];
+
+ error(toString(file) + " is incompatible with " + toString(existing));
return false;
}