aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/ConstantFold.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-08-08 11:24:15 -0700
committerFangrui Song <i@maskray.me>2022-08-08 11:24:15 -0700
commitde9d80c1c579e39cc658a508f1d4ba1cd792e4d5 (patch)
tree169da231cb69f41d33d52469716f5bc337f17465 /llvm/lib/IR/ConstantFold.cpp
parent09db7f533174cdda4655d0114cd88bd22d336e31 (diff)
downloadllvm-de9d80c1c579e39cc658a508f1d4ba1cd792e4d5.zip
llvm-de9d80c1c579e39cc658a508f1d4ba1cd792e4d5.tar.gz
llvm-de9d80c1c579e39cc658a508f1d4ba1cd792e4d5.tar.bz2
[llvm] LLVM_FALLTHROUGH => [[fallthrough]]. NFC
With C++17 there is no Clang pedantic warning or MSVC C5051.
Diffstat (limited to 'llvm/lib/IR/ConstantFold.cpp')
-rw-r--r--llvm/lib/IR/ConstantFold.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp
index 98adff1..f0c41b3 100644
--- a/llvm/lib/IR/ConstantFold.cpp
+++ b/llvm/lib/IR/ConstantFold.cpp
@@ -903,7 +903,7 @@ Constant *llvm::ConstantFoldBinaryInstruction(unsigned Opcode, Constant *C1,
// Handle undef ^ undef -> 0 special case. This is a common
// idiom (misuse).
return Constant::getNullValue(C1->getType());
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Instruction::Add:
case Instruction::Sub:
return UndefValue::get(C1->getType());
@@ -979,7 +979,7 @@ Constant *llvm::ConstantFoldBinaryInstruction(unsigned Opcode, Constant *C1,
// -0.0 - undef --> undef (consistent with "fneg undef")
if (match(C1, m_NegZeroFP()) && isa<UndefValue>(C2))
return C2;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Instruction::FAdd:
case Instruction::FMul:
case Instruction::FDiv:
@@ -1513,7 +1513,7 @@ static ICmpInst::Predicate evaluateICmpRelation(Constant *V1, Constant *V2,
if (const GlobalValue *GV = dyn_cast<GlobalValue>(CE1Op0))
if (const GlobalValue *GV2 = dyn_cast<GlobalValue>(V2))
return areGlobalsPotentiallyEqual(GV, GV2);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Instruction::UIToFP:
case Instruction::SIToFP:
case Instruction::ZExt: