r307472 - [CodeGen] Fold variable into assert.
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 8 07:14:58 PDT 2017
Author: d0k
Date: Sat Jul 8 07:14:57 2017
New Revision: 307472
URL: http://llvm.org/viewvc/llvm-project?rev=307472&view=rev
Log:
[CodeGen] Fold variable into assert.
Avoids warnings in Release builds.
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=307472&r1=307471&r2=307472&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Sat Jul 8 07:14:57 2017
@@ -2433,8 +2433,8 @@ CodeGenModule::GetOrCreateLLVMGlobal(Str
auto ExpectedAS =
D ? D->getType().getAddressSpace()
: (LangOpts.OpenCL ? LangAS::opencl_global : LangAS::Default);
- auto ExpectedTargetAS = getContext().getTargetAddressSpace(ExpectedAS);
- assert(ExpectedTargetAS == Ty->getPointerAddressSpace());
+ assert(getContext().getTargetAddressSpace(ExpectedAS) ==
+ Ty->getPointerAddressSpace());
if (AddrSpace != ExpectedAS)
return getTargetCodeGenInfo().performAddrSpaceCast(*this, GV, AddrSpace,
ExpectedAS, Ty);
More information about the cfe-commits
mailing list