[PATCH] D37891: Driver: hoist the `wchar_t` handling to the driver
Matthias Braun via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 15 17:02:18 PDT 2017
MatzeB added inline comments.
================
Comment at: lib/CodeGen/CodeGenModule.cpp:477
Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity();
- assert((LangOpts.ShortWChar ||
- llvm::TargetLibraryInfoImpl::getTargetWCharSize(Target.getTriple()) ==
----------------
rnk wrote:
> @MatzeB ptal
Can you find a new place for this assert()? Please do not just remove it!
For the backstory: Unfortunately I had to duplicate the wchar decision logic inside llvm (TargetLibraryInfoImpl::getTargetWCharSize() for cases where we just have the target triple available but need to know the size of wchar_t using library function. This means the logic in LLVM needs to be updated when support for new platforms is added but for people adding platform support it will not be obvious that they have the change LLVM/TargetLibraryInfo as well unless an assert() point them to there being a mismatch.
Repository:
rL LLVM
https://reviews.llvm.org/D37891
More information about the cfe-commits
mailing list