forked from OSchip/llvm-project
LLVM_FALLTHROUGH => [[fallthrough]]. NFC
This commit is contained in:
parent
fc63c0542c
commit
0972a390b9
|
@ -193,7 +193,7 @@ public:
|
|||
switch (CFI->getOperation()) {
|
||||
case MCCFIInstruction::OpDefCfa:
|
||||
CfaOffset = CFI->getOffset();
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case MCCFIInstruction::OpDefCfaRegister:
|
||||
CfaReg = CFI->getRegister();
|
||||
break;
|
||||
|
|
|
@ -95,7 +95,7 @@ void RegReAssign::swap(BinaryFunction &Function, MCPhysReg A, MCPhysReg B) {
|
|||
false)));
|
||||
}
|
||||
}
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case MCCFIInstruction::OpUndefined:
|
||||
case MCCFIInstruction::OpDefCfa:
|
||||
case MCCFIInstruction::OpOffset:
|
||||
|
|
|
@ -388,7 +388,7 @@ void StackLayoutModifier::classifyCFIs() {
|
|||
case MCCFIInstruction::OpDefCfa:
|
||||
CfaOffset = -CFI->getOffset();
|
||||
recordAccess(&Inst, CfaOffset);
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case MCCFIInstruction::OpDefCfaRegister:
|
||||
CfaReg = CFI->getRegister();
|
||||
break;
|
||||
|
|
|
@ -1002,7 +1002,7 @@ public:
|
|||
if (isUpper8BitReg(Operand.getReg()))
|
||||
return true;
|
||||
}
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -84,10 +84,10 @@ std::vector<std::string> FuzzySymbolIndex::tokenize(StringRef Text) {
|
|||
switch (State) {
|
||||
case BIG_WORD:
|
||||
Flush(I - 1); // FOOBar: first token is FOO, not FOOB.
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case ONE_BIG:
|
||||
State = SMALL_WORD;
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case SMALL_WORD:
|
||||
break;
|
||||
default:
|
||||
|
@ -98,7 +98,7 @@ std::vector<std::string> FuzzySymbolIndex::tokenize(StringRef Text) {
|
|||
switch (State) {
|
||||
case ONE_BIG:
|
||||
State = BIG_WORD;
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case BIG_WORD:
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -230,7 +230,7 @@ void AvoidCStyleCastsCheck::check(const MatchFinder::MatchResult &Result) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case clang::CK_IntegralCast:
|
||||
// Convert integral and no-op casts between builtin types and enums to
|
||||
// static_cast. A cast from enum to integer may be unnecessary, but it's
|
||||
|
|
|
@ -699,7 +699,7 @@ void AvoidBindCheck::check(const MatchFinder::MatchResult &Result) {
|
|||
Stream << "(" << LP.Callable.UsageIdentifier << ")";
|
||||
break;
|
||||
}
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case CE_InitExpression:
|
||||
Stream << LP.Callable.UsageIdentifier;
|
||||
break;
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
case Stmt::ForStmtClass:
|
||||
case Stmt::SwitchStmtClass:
|
||||
++Info.Branches;
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case Stmt::CompoundStmtClass:
|
||||
TrackedParent.push_back(true);
|
||||
break;
|
||||
|
|
|
@ -221,7 +221,7 @@ struct CompletionCandidate {
|
|||
#ifndef NDEBUG
|
||||
llvm_unreachable("Don't expect members from index in code completion");
|
||||
#else
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case index::SymbolKind::Function:
|
||||
// We can't group overloads together that need different #includes.
|
||||
|
|
|
@ -696,14 +696,14 @@ void parseNamespaceEvents(llvm::StringRef Code, const LangOptions &LangOpts,
|
|||
switch (State) {
|
||||
case UsingNamespace:
|
||||
NSName.clear();
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case UsingNamespaceName:
|
||||
NSName.append(Tok.text(SM).str());
|
||||
State = UsingNamespaceName;
|
||||
break;
|
||||
case Namespace:
|
||||
NSName.clear();
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case NamespaceName:
|
||||
NSName.append(Tok.text(SM).str());
|
||||
State = NamespaceName;
|
||||
|
@ -720,7 +720,7 @@ void parseNamespaceEvents(llvm::StringRef Code, const LangOptions &LangOpts,
|
|||
switch (State) {
|
||||
case UsingNamespace:
|
||||
NSName.clear();
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case UsingNamespaceName:
|
||||
NSName.append("::");
|
||||
State = UsingNamespaceName;
|
||||
|
@ -865,7 +865,7 @@ llvm::StringSet<> collectWords(llvm::StringRef Content) {
|
|||
switch (Roles[I]) {
|
||||
case Head:
|
||||
Flush();
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case Tail:
|
||||
Word.push_back(Content[I]);
|
||||
break;
|
||||
|
|
|
@ -1075,7 +1075,7 @@ public:
|
|||
|
||||
PeerAccessMatrix[SrcDevId][DstDevId] = PeerAccessState::Yes;
|
||||
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
}
|
||||
case PeerAccessState::Yes: {
|
||||
Err = cuMemcpyPeerAsync(
|
||||
|
|
|
@ -1655,7 +1655,7 @@ bool ScopBuilder::buildAccessCallInst(MemAccInst Inst, ScopStmt *Stmt) {
|
|||
return true;
|
||||
case FMRB_OnlyReadsArgumentPointees:
|
||||
ReadOnly = true;
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case FMRB_OnlyWritesArgumentPointees:
|
||||
case FMRB_OnlyAccessesArgumentPointees: {
|
||||
auto AccType = ReadOnly ? MemoryAccess::READ : MemoryAccess::MAY_WRITE;
|
||||
|
@ -2385,7 +2385,7 @@ void ScopBuilder::ensureValueRead(Value *V, ScopStmt *UserStmt) {
|
|||
if (!ModelReadOnlyScalars)
|
||||
break;
|
||||
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case VirtualUse::Inter:
|
||||
|
||||
// Do not create another MemoryAccess for reloading the value if one already
|
||||
|
@ -2482,7 +2482,7 @@ static MemoryAccess::ReductionType getReductionType(const BinaryOperator *BinOp,
|
|||
case Instruction::FAdd:
|
||||
if (!BinOp->isFast())
|
||||
return MemoryAccess::RT_NONE;
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case Instruction::Add:
|
||||
return MemoryAccess::RT_ADD;
|
||||
case Instruction::Or:
|
||||
|
@ -2494,7 +2494,7 @@ static MemoryAccess::ReductionType getReductionType(const BinaryOperator *BinOp,
|
|||
case Instruction::FMul:
|
||||
if (!BinOp->isFast())
|
||||
return MemoryAccess::RT_NONE;
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case Instruction::Mul:
|
||||
if (DisableMultiplicativeReductions)
|
||||
return MemoryAccess::RT_NONE;
|
||||
|
|
|
@ -783,7 +783,7 @@ bool ScopDetection::isValidIntrinsicInst(IntrinsicInst &II,
|
|||
if (!isValidAccess(&II, AF, BP, Context))
|
||||
return false;
|
||||
}
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case Intrinsic::memset:
|
||||
AF = SE.getSCEVAtScope(cast<MemIntrinsic>(II).getDest(), L);
|
||||
if (!AF->isZero()) {
|
||||
|
|
|
@ -300,7 +300,7 @@ static void walkReachable(Scop *S, LoopInfo *LI,
|
|||
// enabled.
|
||||
if (!VUse.getMemoryAccess())
|
||||
break;
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case VirtualUse::Inter:
|
||||
assert(VUse.getMemoryAccess());
|
||||
WorklistAccs.push_back(VUse.getMemoryAccess());
|
||||
|
|
|
@ -801,7 +801,7 @@ public:
|
|||
// reuse the information about UseStmt for DefStmt
|
||||
DefStmt = UseStmt;
|
||||
|
||||
LLVM_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case VirtualUse::Inter:
|
||||
Instruction *Inst = cast<Instruction>(UseVal);
|
||||
|
||||
|
|
Loading…
Reference in New Issue