[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 Sep 15 09:43:14 PDT 2017


rnk added inline comments.


================
Comment at: lib/CodeGen/CodeGenModule.cpp:477
       Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity();
-  assert((LangOpts.ShortWChar ||
-          llvm::TargetLibraryInfoImpl::getTargetWCharSize(Target.getTriple()) ==
----------------
@MatzeB ptal


================
Comment at: lib/Driver/ToolChains/Clang.cpp:2659
+
+  const bool IsAPCSABI =
+      IsARM && (IsGNUEnvironment || IsNetBSD ||
----------------
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?


Repository:
  rL LLVM

https://reviews.llvm.org/D37891





More information about the cfe-commits mailing list