Author: Timm Baeder
Date: 2026-11-01T08:10:26+01:00
New Revision: ceed346b7f51d88889533562a3bc8ef31c8d8f0d

URL: 
https://github.com/llvm/llvm-project/commit/ceed346b7f51d88889533562a3bc8ef31c8d8f0d
DIFF: 
https://github.com/llvm/llvm-project/commit/ceed346b7f51d88889533562a3bc8ef31c8d8f0d.diff

LOG: [clang][bytecode][NFC] Remove useless IsOpaqueConstantCall function 
(#237689)

We're already including ExprConstShared.h, which has a copy of this
function, so just use that.

Added: 
    

Modified: 
    clang/lib/AST/ByteCode/Interp.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/ByteCode/Interp.h b/clang/lib/AST/ByteCode/Interp.h
index 98970cdf2cfc06..a365df655179f0 100644
--- a/clang/lib/AST/ByteCode/Interp.h
+++ b/clang/lib/AST/ByteCode/Interp.h
@@ -1285,14 +1285,6 @@ inline bool CmpHelper<Pointer>(InterpState &S, CodePtr 
OpPC, CompareFn Fn) {
   return true;
 }
 
-static inline bool IsOpaqueConstantCall(const CallExpr *E) {
-  unsigned Builtin = E->getBuiltinCallee();
-  return (Builtin == Builtin::BI__builtin___CFStringMakeConstantString ||
-          Builtin == Builtin::BI__builtin___NSStringMakeConstantString ||
-          Builtin == Builtin::BI__builtin_ptrauth_sign_constant ||
-          Builtin == Builtin::BI__builtin_function_start);
-}
-
 bool arePotentiallyOverlappingStringLiterals(const Pointer &LHS,
                                              const Pointer &RHS);
 
@@ -1384,7 +1376,7 @@ inline bool CmpHelperEQ<Pointer>(InterpState &S, CodePtr 
OpPC, CompareFn Fn) {
         return false;
       }
       if (const auto *CE = dyn_cast<CallExpr>(E);
-          CE && IsOpaqueConstantCall(CE)) {
+          CE && isOpaqueConstantCall(CE)) {
         const SourceInfo &Loc = S.Current->getSource(OpPC);
         S.FFDiag(Loc, diag::note_constexpr_opaque_call_comparison)
             << P.toDiagnosticString(S.getASTContext());


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to