Skip to content

Commit 3f1267e

Browse files
authored
[NFC][clang-offload-bundler] Simplify main function (#138555)
Applied "no else after return" rule from the LLVM's Coding Standards https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return
1 parent 4253405 commit 3f1267e

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -426,12 +426,9 @@ int main(int argc, const char **argv) {
426426
OffloadBundler Bundler(BundlerConfig);
427427

428428
return doWork([&]() {
429-
if (Unbundle) {
430-
if (BundlerConfig.FilesType == "a")
431-
return Bundler.UnbundleArchive();
432-
else
433-
return Bundler.UnbundleFiles();
434-
} else
435-
return Bundler.BundleFiles();
429+
if (Unbundle)
430+
return (BundlerConfig.FilesType == "a") ? Bundler.UnbundleArchive()
431+
: Bundler.UnbundleFiles();
432+
return Bundler.BundleFiles();
436433
});
437434
}

0 commit comments

Comments
 (0)