Skip to content

Commit 1f241f7

Browse files
committed
[clang][bytecode][NFC] Remove unused function prototypes
1 parent 0f0079c commit 1f241f7

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
@@ -814,7 +814,7 @@ bool CheckStore(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {
814814
return true;
815815
}
816816

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

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

1094-
bool CheckNonNullArgs(InterpState &S, CodePtr OpPC, const Function *F,
1095-
const CallExpr *CE, unsigned ArgSize) {
1094+
static bool CheckNonNullArgs(InterpState &S, CodePtr OpPC, const Function *F,
1095+
const CallExpr *CE, unsigned ArgSize) {
10961096
auto Args = ArrayRef(CE->getArgs(), CE->getNumArgs());
10971097
auto NonNullArgs = collectNonNullArgs(F->getDecl(), Args);
10981098
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)