Skip to content

Commit 680d56f

Browse files
committed
[clang][bytecode][NFC] Use getElemType() in __builtin_memchr as well
For consistency.
1 parent 2089b08 commit 680d56f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clang/lib/AST/ByteCode/InterpBuiltin.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2052,9 +2052,7 @@ static bool interp__builtin_memchr(InterpState &S, CodePtr OpPC,
20522052
(ID == Builtin::BIstrchr || ID == Builtin::BI__builtin_strchr);
20532053

20542054
PrimType ElemT =
2055-
IsRawByte
2056-
? PT_Sint8
2057-
: *S.getContext().classify(Ptr.getFieldDesc()->getElemQualType());
2055+
IsRawByte ? PT_Sint8 : *S.getContext().classify(getElemType(Ptr));
20582056

20592057
size_t Index = Ptr.getIndex();
20602058
size_t Step = 0;

0 commit comments

Comments
 (0)