[PATCH] D42441: IRGen: Emit an inline implementation of __builtin_wmemcmp on MSVCRT platforms.
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 24 10:35:16 PST 2018
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
lgtm
================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:1771-1774
+ Value *DstCh =
+ Builder.CreateAlignedLoad(WCharTy, DstPhi, CharUnits::fromQuantity(2));
+ Value *SrcCh =
+ Builder.CreateAlignedLoad(WCharTy, SrcPhi, CharUnits::fromQuantity(2));
----------------
pcc wrote:
> majnemer wrote:
> > Should we be more explicit about where 2 comes from? Maybe `getTypeAlignInChars(WCharTy)`?
> Sure, works for me.
I guess this would handle the (unreasonable) corner case of using wmemcmp, MSVC CRT, and -fno-short-wchar. O_o Anyway, looks good.
https://reviews.llvm.org/D42441
More information about the llvm-commits
mailing list