Skip to content

Commit bbfbe7d

Browse files
authored
[clang][bytecode][NFC] Remove unused function prototypes (llvm#149031)
1 parent 46b4bd2 commit bbfbe7d

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

clang/lib/AST/ByteCode/Interp.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ bool CheckStore(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {
815815
return true;
816816
}
817817

818-
bool CheckInvoke(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {
818+
static bool CheckInvoke(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {
819819
if (!CheckLive(S, OpPC, Ptr, AK_MemberCall))
820820
return false;
821821
if (!Ptr.isDummy()) {
@@ -937,7 +937,7 @@ bool CheckCallable(InterpState &S, CodePtr OpPC, const Function *F) {
937937
return false;
938938
}
939939

940-
bool CheckCallDepth(InterpState &S, CodePtr OpPC) {
940+
static bool CheckCallDepth(InterpState &S, CodePtr OpPC) {
941941
if ((S.Current->getDepth() + 1) > S.getLangOpts().ConstexprCallDepth) {
942942
S.FFDiag(S.Current->getSource(OpPC),
943943
diag::note_constexpr_depth_limit_exceeded)
@@ -1092,8 +1092,8 @@ bool CheckDummy(InterpState &S, CodePtr OpPC, const Pointer &Ptr,
10921092
return false;
10931093
}
10941094

1095-
bool CheckNonNullArgs(InterpState &S, CodePtr OpPC, const Function *F,
1096-
const CallExpr *CE, unsigned ArgSize) {
1095+
static bool CheckNonNullArgs(InterpState &S, CodePtr OpPC, const Function *F,
1096+
const CallExpr *CE, unsigned ArgSize) {
10971097
auto Args = ArrayRef(CE->getArgs(), CE->getNumArgs());
10981098
auto NonNullArgs = collectNonNullArgs(F->getDecl(), Args);
10991099
unsigned Offset = 0;

clang/lib/AST/ByteCode/Interp.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -98,26 +98,12 @@ bool CheckGlobalInitialized(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
9898
/// Checks if a value can be stored in a block.
9999
bool CheckStore(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
100100

101-
/// Checks if a method can be invoked on an object.
102-
bool CheckInvoke(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
103-
104101
/// Checks if a value can be initialized.
105102
bool CheckInit(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
106103

107-
/// Checks if a method can be called.
108-
bool CheckCallable(InterpState &S, CodePtr OpPC, const Function *F);
109-
110-
/// Checks if calling the currently active function would exceed
111-
/// the allowed call depth.
112-
bool CheckCallDepth(InterpState &S, CodePtr OpPC);
113-
114104
/// Checks the 'this' pointer.
115105
bool CheckThis(InterpState &S, CodePtr OpPC, const Pointer &This);
116106

117-
/// Checks if all the arguments annotated as 'nonnull' are in fact not null.
118-
bool CheckNonNullArgs(InterpState &S, CodePtr OpPC, const Function *F,
119-
const CallExpr *CE, unsigned ArgSize);
120-
121107
/// Checks if dynamic memory allocation is available in the current
122108
/// language mode.
123109
bool CheckDynamicMemoryAllocation(InterpState &S, CodePtr OpPC);

0 commit comments

Comments
 (0)