[clang] [Clang] Do not emit 'wchar' module flag for OpenCL (PR #174454)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 1 06:46:55 PST 2026
================
@@ -1164,7 +1164,8 @@ void CodeGenModule::Release() {
// TargetLibraryInfo.
uint64_t WCharWidth =
Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity();
- getModule().addModuleFlag(llvm::Module::Error, "wchar_size", WCharWidth);
+ if (!LangOpts.OpenCL)
----------------
jhuber6 wrote:
More or less, it would probably make sense to default to the Triple's definition and emit this if someone overrode if the value in clang differs from what the Triple returns.
https://github.com/llvm/llvm-project/pull/174454
More information about the cfe-commits
mailing list