r314187 - CodeGenModule: Adapt to LLVM TargetLibraryInfo changes
Matthias Braun via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 25 19:37:23 PDT 2017
Author: matze
Date: Mon Sep 25 19:37:23 2017
New Revision: 314187
URL: http://llvm.org/viewvc/llvm-project?rev=314187&view=rev
Log:
CodeGenModule: Adapt to LLVM TargetLibraryInfo changes
Adapt to LLVM TargetLibraryInfo changes in r314185.
See also https://reviews.llvm.org/D38106 and https://reviews.llvm.org/D37891
Modified:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=314187&r1=314186&r2=314187&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Mon Sep 25 19:37:23 2017
@@ -476,17 +476,11 @@ void CodeGenModule::Release() {
getModule().addModuleFlag(llvm::Module::Warning, "Debug Info Version",
llvm::DEBUG_METADATA_VERSION);
- // Width of wchar_t in bytes
- uint64_t WCharWidth =
- Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity();
- assert((LangOpts.ShortWChar ||
- llvm::TargetLibraryInfoImpl::getTargetWCharSize(Target.getTriple()) ==
- Target.getWCharWidth() / 8) &&
- "LLVM wchar_t size out of sync");
-
// We need to record the widths of enums and wchar_t, so that we can generate
// the correct build attributes in the ARM backend. wchar_size is also used by
// TargetLibraryInfo.
+ uint64_t WCharWidth =
+ Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity();
getModule().addModuleFlag(llvm::Module::Error, "wchar_size", WCharWidth);
llvm::Triple::ArchType Arch = Context.getTargetInfo().getTriple().getArch();
More information about the cfe-commits
mailing list