[clang] 5978551 - [clang][bytecode][NFC] Avoid classify calls in visitZeroRecordInitializer (#192676)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 18 22:30:18 PDT 2026
Author: Timm Baeder
Date: 2026-04-19T07:30:14+02:00
New Revision: 59785514f9f981c69b933ffb5739201dede521c2
URL: https://github.com/llvm/llvm-project/commit/59785514f9f981c69b933ffb5739201dede521c2
DIFF: https://github.com/llvm/llvm-project/commit/59785514f9f981c69b933ffb5739201dede521c2.diff
LOG: [clang][bytecode][NFC] Avoid classify calls in visitZeroRecordInitializer (#192676)
We already have the PrimType in the Descriptor.
Added:
Modified:
clang/lib/AST/ByteCode/Compiler.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/ByteCode/Compiler.cpp b/clang/lib/AST/ByteCode/Compiler.cpp
index 4714ea5aa8a43..329c11000054e 100644
--- a/clang/lib/AST/ByteCode/Compiler.cpp
+++ b/clang/lib/AST/ByteCode/Compiler.cpp
@@ -4765,7 +4765,7 @@ bool Compiler<Emitter>::visitZeroRecordInitializer(const Record *R,
const Descriptor *D = Field.Desc;
if (D->isPrimitive()) {
QualType QT = D->getType();
- PrimType T = classifyPrim(D->getType());
+ PrimType T = D->getPrimType();
if (!this->visitZeroInitializer(T, QT, E))
return false;
if (R->isUnion()) {
@@ -4783,7 +4783,7 @@ bool Compiler<Emitter>::visitZeroRecordInitializer(const Record *R,
if (D->isPrimitiveArray()) {
QualType ET = D->getElemQualType();
- PrimType T = classifyPrim(ET);
+ PrimType T = D->getPrimType();
for (uint32_t I = 0, N = D->getNumElems(); I != N; ++I) {
if (!this->visitZeroInitializer(T, ET, E))
return false;
More information about the cfe-commits
mailing list