Skip to content

Commit 5fc891b

Browse files
authored
[clang][bytecode][NFC] Use getElemType() in __builtin_memchr as well (#132550)
For consistency.
1 parent 5999be0 commit 5fc891b

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
@@ -2053,9 +2053,7 @@ static bool interp__builtin_memchr(InterpState &S, CodePtr OpPC,
20532053
(ID == Builtin::BIstrchr || ID == Builtin::BI__builtin_strchr);
20542054

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

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

0 commit comments

Comments
 (0)