diff options
author | Timm Baeder <tbaeder@redhat.com> | 2025-04-16 13:21:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-16 13:21:25 +0200 |
commit | 2d63faead4e6339e679ab62113f47112d67a5b06 (patch) | |
tree | aecc1c192d59922469337f1ef7b64b1b0fc8d210 /clang/lib/AST/ByteCode/InterpBuiltin.cpp | |
parent | 1e61b374ba3ba2891dc1abda732b0b9263216785 (diff) | |
download | llvm-2d63faead4e6339e679ab62113f47112d67a5b06.zip llvm-2d63faead4e6339e679ab62113f47112d67a5b06.tar.gz llvm-2d63faead4e6339e679ab62113f47112d67a5b06.tar.bz2 |
[clang][bytecode][NFC] Remove PT_FnPtr (#135947)
We don't need this anymore since we don't return it from classify()
anymore.
Diffstat (limited to 'clang/lib/AST/ByteCode/InterpBuiltin.cpp')
-rw-r--r-- | clang/lib/AST/ByteCode/InterpBuiltin.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
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<X>(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<FunctionPointer>(); - S.Stk.push<FunctionPointer>(Arg); - } else if (PtrT == PT_Ptr) { + if (PtrT == PT_Ptr) { const Pointer &Arg = S.Stk.peek<Pointer>(); S.Stk.push<Pointer>(Arg); } else { |