-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[clang-linker-wrapper][NFC] Invert condition for readability #161557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I find the positive expressions easier to read than negative.
|
@llvm/pr-subscribers-clang Author: Alexey Bader (bader) ChangesI find the positive expressions easier to read than negative. Full diff: https://github.com/llvm/llvm-project/pull/161557.diff 1 Files Affected:
diff --git a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
index be658acacb406..1419b8c90a625 100644
--- a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
+++ b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
@@ -608,10 +608,10 @@ Expected<StringRef> linkDevice(ArrayRef<StringRef> InputFiles,
Error containerizeRawImage(std::unique_ptr<MemoryBuffer> &Img, OffloadKind Kind,
const ArgList &Args) {
llvm::Triple Triple(Args.getLastArgValue(OPT_triple_EQ));
- if (Kind != OFK_OpenMP || !Triple.isSPIRV() ||
- Triple.getVendor() != llvm::Triple::Intel)
- return Error::success();
- return offloading::intel::containerizeOpenMPSPIRVImage(Img);
+ if (Kind == OFK_OpenMP && Triple.isSPIRV() &&
+ Triple.getVendor() == llvm::Triple::Intel)
+ return offloading::intel::containerizeOpenMPSPIRVImage(Img);
+ return Error::success();
}
Expected<StringRef> writeOffloadFile(const OffloadFile &File) {
|
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/14588 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/85/builds/14069 Here is the relevant piece of the build log for the reference |
…1557) I find the positive expressions easier to read than negative.
I find the positive expressions easier to read than negative.