[llvm] 60a5980 - [NFC][Attributor] Fix warning in last commit
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 7 15:51:00 PST 2022
Author: Roman Lebedev
Date: 2022-12-08T02:50:31+03:00
New Revision: 60a59807a558d4ccf06dd8aa348e75c4dc02f2c6
URL: https://github.com/llvm/llvm-project/commit/60a59807a558d4ccf06dd8aa348e75c4dc02f2c6
DIFF: https://github.com/llvm/llvm-project/commit/60a59807a558d4ccf06dd8aa348e75c4dc02f2c6.diff
LOG: [NFC][Attributor] Fix warning in last commit
```
/repositories/llvm-project/llvm/include/llvm/Transforms/IPO/Attributor.h:5076:47: note: cast one or both operands to int to silence this warning
1 warning generated.
[ 89% 599/666][ 75% 00:48 + 00:15] Building CXX object lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilderPipelines.cpp.o
In file included from /repositories/llvm-project/llvm/lib/Passes/PassBuilderPipelines.cpp:42:
/repositories/llvm-project/llvm/include/llvm/Transforms/IPO/Attributor.h:5076:47: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
bool isWriteOrAssumption() const { return isWrite() | isAssumption(); }
^~~~~~~~~~~~~~~~~~~~~~~~~~
||
```
Added:
Modified:
llvm/include/llvm/Transforms/IPO/Attributor.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h
index 54a4a430bc8b..38bcd0586546 100644
--- a/llvm/include/llvm/Transforms/IPO/Attributor.h
+++ b/llvm/include/llvm/Transforms/IPO/Attributor.h
@@ -5073,7 +5073,7 @@ struct AAPointerInfo : public AbstractAttribute {
bool isWrite() const { return Kind & AK_W; }
/// Return true if this is a write access.
- bool isWriteOrAssumption() const { return isWrite() | isAssumption(); }
+ bool isWriteOrAssumption() const { return isWrite() || isAssumption(); }
/// Return true if this is an assumption access.
bool isAssumption() const { return Kind == AK_ASSUMPTION; }
More information about the llvm-commits
mailing list