[PATCH] D37891: Driver: hoist the `wchar_t` handling to the driver
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 6 15:44:59 PDT 2017
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
Looks good with nits
================
Comment at: lib/Basic/Targets/AArch64.cpp:47-51
+ bool IsNetBSD = getTriple().getOS() == llvm::Triple::NetBSD;
+ bool IsOpenBSD = getTriple().getOS() == llvm::Triple::OpenBSD;
+ if (!getTriple().isOSDarwin() && !IsNetBSD && !IsOpenBSD)
+ WCharType = UnsignedInt;
+
----------------
I felt like this was clearer the way it was before, and we're already checking for the BSDs above.
================
Comment at: lib/Basic/Targets/AArch64.cpp:160-161
- Builder.defineMacro("__ARM_SIZEOF_WCHAR_T", Opts.ShortWChar ? "2" : "4");
+ Builder.defineMacro("__ARM_SIZEOF_WCHAR_T",
+ llvm::utostr(Opts.WCharSize ? Opts.WCharSize : 4));
----------------
This is correct because we compute macros after we apply the flag override, right?
Repository:
rL LLVM
https://reviews.llvm.org/D37891
More information about the cfe-commits
mailing list