https://github.com/tbaederr updated 
https://github.com/llvm/llvm-project/pull/132550

>From 060f275678f831a12b07af626919615e468165c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbae...@redhat.com>
Date: Sat, 22 Mar 2025 15:23:07 +0100
Subject: [PATCH] [clang][bytecode][NFC] Use getElemType() in __builtin_memchr
 as well

For consistency.
---
 clang/lib/AST/ByteCode/InterpBuiltin.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/clang/lib/AST/ByteCode/InterpBuiltin.cpp 
b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
index 2cbbfe5a9987f..4c359b100ab7e 100644
--- a/clang/lib/AST/ByteCode/InterpBuiltin.cpp
+++ b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
@@ -2053,9 +2053,7 @@ static bool interp__builtin_memchr(InterpState &S, 
CodePtr OpPC,
       (ID == Builtin::BIstrchr || ID == Builtin::BI__builtin_strchr);
 
   PrimType ElemT =
-      IsRawByte
-          ? PT_Sint8
-          : *S.getContext().classify(Ptr.getFieldDesc()->getElemQualType());
+      IsRawByte ? PT_Sint8 : *S.getContext().classify(getElemType(Ptr));
 
   size_t Index = Ptr.getIndex();
   size_t Step = 0;

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to