https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/218391
None >From 3969cf4e15e0ef2d1faa376ffbc8796b2614a1cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= <[email protected]> Date: Mon, 24 Aug 2026 14:46:22 +0200 Subject: [PATCH] [clang][bytecode] Avoid an APFloat copy --- clang/lib/AST/ByteCode/Compiler.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/clang/lib/AST/ByteCode/Compiler.cpp b/clang/lib/AST/ByteCode/Compiler.cpp index 87d23bf5df0c8..afcc125f7e1ec 100644 --- a/clang/lib/AST/ByteCode/Compiler.cpp +++ b/clang/lib/AST/ByteCode/Compiler.cpp @@ -5832,10 +5832,8 @@ bool Compiler<Emitter>::visitAPValue(const APValue &Val, PrimType ValType, assert(!DiscardResult); if (Val.isInt()) return this->emitConst(Val.getInt(), ValType, Info); - if (Val.isFloat()) { - APFloat F = Val.getFloat(); - return this->emitFloat(F, Info); - } + if (Val.isFloat()) + return this->emitFloat(Val.getFloat(), Info); if (Val.isMemberPointer()) { if (const ValueDecl *MemberDecl = Val.getMemberPointerDecl()) { _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
