[PATCH] D37891: Driver: hoist the `wchar_t` handling to the driver

Saleem Abdulrasool via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 5 12:03:27 PDT 2017


compnerd added inline comments.


================
Comment at: lib/Basic/TargetInfo.cpp:29
+namespace {
+TargetInfo::IntType GetDefaultWCharType(const llvm::Triple &T) {
+  const llvm::Triple::ArchType Arch = T.getArch();
----------------
rnk wrote:
> How is this better than what we had before? It's totally inconsistent with our existing strategy for figuring out type widths and sizes. Our current approach can be extended for new targets, this requires modifying shared TargetInfo code. This refactoring *should* be NFC anyway, so if we did want to do it, we'd want to split it out.
The previous thing was split across and was fairly difficult to identify what was going on.  I tend to think that this makes it easier to identify what is going on.  However, if you have a strong opinion on this, Im willing to switch it back (though, possibly retain some of the adjustments to make it easier to follow).


https://reviews.llvm.org/D37891





More information about the cfe-commits mailing list