From 2d63faead4e6339e679ab62113f47112d67a5b06 Mon Sep 17 00:00:00 2001 From: Timm Baeder Date: Wed, 16 Apr 2025 13:21:25 +0200 Subject: [clang][bytecode][NFC] Remove PT_FnPtr (#135947) We don't need this anymore since we don't return it from classify() anymore. --- clang/lib/AST/ByteCode/InterpBuiltin.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'clang/lib/AST/ByteCode/InterpBuiltin.cpp') diff --git a/clang/lib/AST/ByteCode/InterpBuiltin.cpp b/clang/lib/AST/ByteCode/InterpBuiltin.cpp index bde416d..d06941b 100644 --- a/clang/lib/AST/ByteCode/InterpBuiltin.cpp +++ b/clang/lib/AST/ByteCode/InterpBuiltin.cpp @@ -130,7 +130,6 @@ static bool retPrimValue(InterpState &S, CodePtr OpPC, return Ret(S, OpPC); switch (*T) { RET_CASE(PT_Ptr); - RET_CASE(PT_FnPtr); RET_CASE(PT_Float); RET_CASE(PT_Bool); RET_CASE(PT_Sint8); @@ -766,10 +765,7 @@ static bool interp__builtin_addressof(InterpState &S, CodePtr OpPC, assert(Call->getArg(0)->isLValue()); PrimType PtrT = S.getContext().classify(Call->getArg(0)).value_or(PT_Ptr); - if (PtrT == PT_FnPtr) { - const FunctionPointer &Arg = S.Stk.peek(); - S.Stk.push(Arg); - } else if (PtrT == PT_Ptr) { + if (PtrT == PT_Ptr) { const Pointer &Arg = S.Stk.peek(); S.Stk.push(Arg); } else { -- cgit v1.1