summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-09-26 02:37:23 +0000
committerMatthias Braun <matze@braunis.de>2017-09-26 02:37:23 +0000
commitbffc1bb2b2dd6ba35bc763c8a475f03522bb7206 (patch)
tree51cffec01381f29d62f61a8046ddbaed23277764 /clang/lib/CodeGen/CodeGenModule.cpp
parentc9e458ca3feef84453f186f855f261d251c2889a (diff)
downloadbcm5719-llvm-bffc1bb2b2dd6ba35bc763c8a475f03522bb7206.tar.gz
bcm5719-llvm-bffc1bb2b2dd6ba35bc763c8a475f03522bb7206.zip
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 llvm-svn: 314187
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index a8cc50bdd64..03a3e36b831 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -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();
OpenPOWER on IntegriCloud