[PATCH] D37891: Driver: hoist the `wchar_t` handling to the driver
Saleem Abdulrasool via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 15 14:05:15 PDT 2017
compnerd added inline comments.
================
Comment at: lib/Driver/ToolChains/Clang.cpp:2659
+
+ const bool IsAPCSABI =
+ IsARM && (IsGNUEnvironment || IsNetBSD ||
----------------
rnk wrote:
> This target detection logic is insanely complicated, and I'm not convinced it's simpler than the Basic/Targets/ delegation strategy.
>
> I can go either way on putting this info in the Driver or Basic, but this code needs to be simpler. Surely a switch could help here?
I like the idea of the switch, I'll try to convert this. In my defense, this was trying to be a translation of the original conditions in Basic. Doesn't mean that I like this or don't want this to converted into something saner.
If we put this into Basic, we get back the 3-bits of information ({`char`, `short`, `int`} * {`signed`, `unsigned`}) into 1-bit :-p. This was a pretty painful change, but I think that it does result in a simpler flow for the frontend.
Repository:
rL LLVM
https://reviews.llvm.org/D37891
More information about the cfe-commits
mailing list