[Lldb-commits] [lldb] 6006d43 - LLVM_FALLTHROUGH => [[fallthrough]]. NFC
Craig Topper via lldb-commits
lldb-commits at lists.llvm.org
Wed May 24 12:43:05 PDT 2023
Author: Craig Topper
Date: 2023-05-24T12:40:10-07:00
New Revision: 6006d43e2d7dda56844f1c3867baa981cfefb8ea
URL: https://github.com/llvm/llvm-project/commit/6006d43e2d7dda56844f1c3867baa981cfefb8ea
DIFF: https://github.com/llvm/llvm-project/commit/6006d43e2d7dda56844f1c3867baa981cfefb8ea.diff
LOG: LLVM_FALLTHROUGH => [[fallthrough]]. NFC
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D150996
Added:
Modified:
clang/lib/AST/TemplateBase.cpp
clang/lib/Basic/SourceManager.cpp
clang/lib/Sema/SemaChecking.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
llvm/lib/Analysis/MemoryLocation.cpp
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/lib/DebugInfo/LogicalView/Readers/LVBinaryReader.cpp
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
llvm/lib/ProfileData/InstrProf.cpp
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCRegisterInfo.h
llvm/lib/Target/SPIRV/SPIRVISelLowering.cpp
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/TemplateBase.cpp b/clang/lib/AST/TemplateBase.cpp
index c21e9c861875..c46b3e3d0c50 100644
--- a/clang/lib/AST/TemplateBase.cpp
+++ b/clang/lib/AST/TemplateBase.cpp
@@ -327,7 +327,7 @@ void TemplateArgument::Profile(llvm::FoldingSetNodeID &ID,
case TemplateExpansion:
ID.AddInteger(TemplateArg.NumExpansions);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Template:
ID.AddPointer(TemplateArg.Name);
break;
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp
index f4ddae17f578..6fa802a33a50 100644
--- a/clang/lib/Basic/SourceManager.cpp
+++ b/clang/lib/Basic/SourceManager.cpp
@@ -1312,7 +1312,7 @@ LineOffsetMapping LineOffsetMapping::get(llvm::MemoryBufferRef Buffer,
if (*Buf == '\n') {
++Buf;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case '\n':
LineOffsets.push_back(Buf - Start);
};
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 6c2cbc60a81d..c02f4f5a5269 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -3792,7 +3792,7 @@ bool Sema::CheckLoongArchBuiltinFunctionCall(const TargetInfo &TI,
return Diag(TheCall->getBeginLoc(),
diag::err_loongarch_builtin_requires_la64)
<< TheCall->getSourceRange();
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case LoongArch::BI__builtin_loongarch_cacop_w: {
if (BuiltinID == LoongArch::BI__builtin_loongarch_cacop_w &&
!TI.hasFeature("32bit"))
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
index 8d8af21e1994..7b74129f848e 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
@@ -511,14 +511,14 @@ ClangExpressionParser::ClangExpressionParser(
break;
case lldb::eLanguageTypeC_plus_plus_20:
lang_opts.CPlusPlus20 = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case lldb::eLanguageTypeC_plus_plus_17:
// FIXME: add a separate case for CPlusPlus14. Currently folded into C++17
// because C++14 is the default standard for Clang but enabling CPlusPlus14
// expression evaluatino doesn't pass the test-suite cleanly.
lang_opts.CPlusPlus14 = true;
lang_opts.CPlusPlus17 = true;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case lldb::eLanguageTypeC_plus_plus:
case lldb::eLanguageTypeC_plus_plus_11:
case lldb::eLanguageTypeC_plus_plus_14:
diff --git a/llvm/lib/Analysis/MemoryLocation.cpp b/llvm/lib/Analysis/MemoryLocation.cpp
index e839f9e0dfb2..0404b32be848 100644
--- a/llvm/lib/Analysis/MemoryLocation.cpp
+++ b/llvm/lib/Analysis/MemoryLocation.cpp
@@ -257,7 +257,7 @@ MemoryLocation MemoryLocation::getForArgument(const CallBase *Call,
case LibFunc_memset_chk:
assert(ArgIdx == 0 && "Invalid argument index for memset_chk");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case LibFunc_memcpy_chk: {
assert((ArgIdx == 0 || ArgIdx == 1) &&
"Invalid argument index for memcpy_chk");
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 2ad787053f83..a700eaedd6c7 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -15325,7 +15325,7 @@ const SCEV *ScalarEvolution::applyLoopGuards(const SCEV *Expr, const Loop *L) {
if (RHS->getType()->isPointerTy())
return;
RHS = getUMaxExpr(RHS, One);
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case CmpInst::ICMP_SLT: {
RHS = getMinusSCEV(RHS, One);
RHS = DividesBy ? GetPreviousSCEVDividesByDivisor(RHS, DividesBy) : RHS;
diff --git a/llvm/lib/DebugInfo/LogicalView/Readers/LVBinaryReader.cpp b/llvm/lib/DebugInfo/LogicalView/Readers/LVBinaryReader.cpp
index 2be72a2c4e74..a0cd8b7839cf 100644
--- a/llvm/lib/DebugInfo/LogicalView/Readers/LVBinaryReader.cpp
+++ b/llvm/lib/DebugInfo/LogicalView/Readers/LVBinaryReader.cpp
@@ -443,7 +443,7 @@ Error LVBinaryReader::createInstructions(LVScope *Scope,
break;
case MCDisassembler::SoftFail:
LLVM_DEBUG({ dbgs() << "Potentially undefined instruction:"; });
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case MCDisassembler::Success: {
std::string Buffer;
raw_string_ostream Stream(Buffer);
diff --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
index 4b4a71062e93..19ba9e8c2243 100644
--- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -2420,7 +2420,7 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::applyWorkshareLoop(
case OMPScheduleType::BaseRuntimeSimd:
assert(!ChunkSize &&
"schedule type does not support user-defined chunk sizes");
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case OMPScheduleType::BaseDynamicChunked:
case OMPScheduleType::BaseGuidedChunked:
case OMPScheduleType::BaseGuidedIterativeChunked:
diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp
index 1dd1ce4b3e50..749147a09fa5 100644
--- a/llvm/lib/ProfileData/InstrProf.cpp
+++ b/llvm/lib/ProfileData/InstrProf.cpp
@@ -1385,7 +1385,7 @@ Expected<Header> Header::readFromBuffer(const unsigned char *Buffer) {
case 10ull:
H.TemporalProfTracesOffset =
read(Buffer, offsetOf(&Header::TemporalProfTracesOffset));
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case 9ull:
H.BinaryIdOffset = read(Buffer, offsetOf(&Header::BinaryIdOffset));
[[fallthrough]];
diff --git a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
index 31d6d97bf26a..3b10a2743c5f 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
@@ -2529,7 +2529,7 @@ InstructionCost AArch64TTIImpl::getArithmeticInstrCost(
return 2 * LT.first;
if (!Ty->getScalarType()->isFP128Ty())
return LT.first;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case ISD::FMUL:
case ISD::FDIV:
// These nodes are marked as 'custom' just to lower them to SVE.
diff --git a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
index c517f1b72270..41bdf45ec10a 100644
--- a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
@@ -3994,7 +3994,7 @@ bool PPCDAGToDAGISel::tryBitPermutation(SDNode *N) {
if (SRLConst && SRLConst->getSExtValue() == 16)
return false;
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case ISD::ROTL:
case ISD::SHL:
case ISD::AND:
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index 1598f4b92c9c..e9554a831be3 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -10686,7 +10686,7 @@ SDValue PPCTargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op,
RetOps.push_back(Extract);
return DAG.getMergeValues(RetOps, dl);
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
case Intrinsic::ppc_vsx_disassemble_pair: {
int NumVecs = 2;
diff --git a/llvm/lib/Target/PowerPC/PPCRegisterInfo.h b/llvm/lib/Target/PowerPC/PPCRegisterInfo.h
index 2a2fe2598936..11dbbce42f61 100644
--- a/llvm/lib/Target/PowerPC/PPCRegisterInfo.h
+++ b/llvm/lib/Target/PowerPC/PPCRegisterInfo.h
@@ -183,7 +183,7 @@ class PPCRegisterInfo : public PPCGenRegisterInfo {
case 'f':
if (RegName[1] == 'p')
return RegName + 2;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case 'r':
case 'v':
if (RegName[1] == 's') {
diff --git a/llvm/lib/Target/SPIRV/SPIRVISelLowering.cpp b/llvm/lib/Target/SPIRV/SPIRVISelLowering.cpp
index c2582bc298b4..33c6aa242969 100644
--- a/llvm/lib/Target/SPIRV/SPIRVISelLowering.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVISelLowering.cpp
@@ -55,7 +55,7 @@ bool SPIRVTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
switch (Intrinsic) {
case Intrinsic::spv_load:
AlignIdx = 2;
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
case Intrinsic::spv_store: {
if (I.getNumOperands() >= AlignIdx + 1) {
auto *AlignOp = cast<ConstantInt>(I.getOperand(AlignIdx));
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index dab4d16d3d9e..ad1326c76166 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -8487,7 +8487,7 @@ VPRecipeBase *VPRecipeBuilder::tryToWiden(Instruction *I,
Ops[1] = SafeRHS;
return new VPWidenRecipe(*I, make_range(Ops.begin(), Ops.end()));
}
- LLVM_FALLTHROUGH;
+ [[fallthrough]];
}
case Instruction::Add:
case Instruction::And:
More information about the lldb-commits
mailing list