[clang] [clang][bytecode][NFC] Avoid classfiy calls in visitZeroRecordInitial… (PR #192676)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 17 07:51:10 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
<details>
<summary>Changes</summary>
…izer
We already have the PrimType in the Descriptor.
---
Full diff: https://github.com/llvm/llvm-project/pull/192676.diff
1 Files Affected:
- (modified) clang/lib/AST/ByteCode/Compiler.cpp (+2-2)
``````````diff
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;
``````````
</details>
https://github.com/llvm/llvm-project/pull/192676
More information about the cfe-commits
mailing list