Skip to content

Commit cf4498e

Browse files
committed
Mark a couple of local sil-optimizer functions as static NFC
1 parent 5551987 commit cf4498e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: lib/SILOptimizer/Transforms/CSE.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ using ApplyWitnessPair = std::pair<ApplyInst *, WitnessMethodInst *>;
686686
/// Returns the Apply and WitnessMethod instructions that use the
687687
/// open_existential_addr instructions, or null if at least one of the
688688
/// instructions is missing.
689-
ApplyWitnessPair getOpenExistentialUsers(OpenExistentialAddrInst *OE) {
689+
static ApplyWitnessPair getOpenExistentialUsers(OpenExistentialAddrInst *OE) {
690690
ApplyInst *AI = nullptr;
691691
WitnessMethodInst *WMI = nullptr;
692692
ApplyWitnessPair Empty = std::make_pair(nullptr, nullptr);

Diff for: lib/SILOptimizer/Transforms/SimplifyCFG.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -2751,8 +2751,8 @@ getSILValueFromCaseResult(SILBuilder &B, SILLocation Loc,
27512751
/// a given enum is of a given tag. If so, create a new select_enum instruction
27522752
/// This is used to simplify arbitrary simple switch_enum diamonds into
27532753
/// select_enums.
2754-
bool simplifySwitchEnumToSelectEnum(SILBasicBlock *BB, unsigned ArgNum,
2755-
SILArgument *IntArg) {
2754+
static bool simplifySwitchEnumToSelectEnum(SILBasicBlock *BB, unsigned ArgNum,
2755+
SILArgument *IntArg) {
27562756

27572757
// Don't know which values should be passed if there is more
27582758
// than one basic block argument.

0 commit comments

Comments
 (0)