diff options
author | Timm Baeder <tbaeder@redhat.com> | 2025-07-16 11:25:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-16 11:25:19 +0200 |
commit | bbfbe7d789f7b6ade715f3656db0bdd657eeef68 (patch) | |
tree | 4fe83f434eadf8d127e0a48f2871dd271e3a5ae2 | |
parent | 46b4bd2882447c46138f7272bc915ce6f74bf7bc (diff) | |
download | llvm-bbfbe7d789f7b6ade715f3656db0bdd657eeef68.zip llvm-bbfbe7d789f7b6ade715f3656db0bdd657eeef68.tar.gz llvm-bbfbe7d789f7b6ade715f3656db0bdd657eeef68.tar.bz2 |
[clang][bytecode][NFC] Remove unused function prototypes (#149031)
-rw-r--r-- | clang/lib/AST/ByteCode/Interp.cpp | 8 | ||||
-rw-r--r-- | clang/lib/AST/ByteCode/Interp.h | 14 |
2 files changed, 4 insertions, 18 deletions
diff --git a/clang/lib/AST/ByteCode/Interp.cpp b/clang/lib/AST/ByteCode/Interp.cpp index 98fb8c8..edb1866 100644 --- a/clang/lib/AST/ByteCode/Interp.cpp +++ b/clang/lib/AST/ByteCode/Interp.cpp @@ -815,7 +815,7 @@ bool CheckStore(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { return true; } -bool CheckInvoke(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { +static bool CheckInvoke(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { if (!CheckLive(S, OpPC, Ptr, AK_MemberCall)) return false; if (!Ptr.isDummy()) { @@ -937,7 +937,7 @@ bool CheckCallable(InterpState &S, CodePtr OpPC, const Function *F) { return false; } -bool CheckCallDepth(InterpState &S, CodePtr OpPC) { +static bool CheckCallDepth(InterpState &S, CodePtr OpPC) { if ((S.Current->getDepth() + 1) > S.getLangOpts().ConstexprCallDepth) { S.FFDiag(S.Current->getSource(OpPC), diag::note_constexpr_depth_limit_exceeded) @@ -1092,8 +1092,8 @@ bool CheckDummy(InterpState &S, CodePtr OpPC, const Pointer &Ptr, return false; } -bool CheckNonNullArgs(InterpState &S, CodePtr OpPC, const Function *F, - const CallExpr *CE, unsigned ArgSize) { +static bool CheckNonNullArgs(InterpState &S, CodePtr OpPC, const Function *F, + const CallExpr *CE, unsigned ArgSize) { auto Args = ArrayRef(CE->getArgs(), CE->getNumArgs()); auto NonNullArgs = collectNonNullArgs(F->getDecl(), Args); unsigned Offset = 0; diff --git a/clang/lib/AST/ByteCode/Interp.h b/clang/lib/AST/ByteCode/Interp.h index 6be68e4..ce0ebdd 100644 --- a/clang/lib/AST/ByteCode/Interp.h +++ b/clang/lib/AST/ByteCode/Interp.h @@ -98,26 +98,12 @@ bool CheckGlobalInitialized(InterpState &S, CodePtr OpPC, const Pointer &Ptr); /// Checks if a value can be stored in a block. bool CheckStore(InterpState &S, CodePtr OpPC, const Pointer &Ptr); -/// Checks if a method can be invoked on an object. -bool CheckInvoke(InterpState &S, CodePtr OpPC, const Pointer &Ptr); - /// Checks if a value can be initialized. bool CheckInit(InterpState &S, CodePtr OpPC, const Pointer &Ptr); -/// Checks if a method can be called. -bool CheckCallable(InterpState &S, CodePtr OpPC, const Function *F); - -/// Checks if calling the currently active function would exceed -/// the allowed call depth. -bool CheckCallDepth(InterpState &S, CodePtr OpPC); - /// Checks the 'this' pointer. bool CheckThis(InterpState &S, CodePtr OpPC, const Pointer &This); -/// Checks if all the arguments annotated as 'nonnull' are in fact not null. -bool CheckNonNullArgs(InterpState &S, CodePtr OpPC, const Function *F, - const CallExpr *CE, unsigned ArgSize); - /// Checks if dynamic memory allocation is available in the current /// language mode. bool CheckDynamicMemoryAllocation(InterpState &S, CodePtr OpPC); |