[llvm] r273737 - Fix unused variable warning in -asserts builds.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 24 14:37:11 PDT 2016
Author: pcc
Date: Fri Jun 24 16:37:11 2016
New Revision: 273737
URL: http://llvm.org/viewvc/llvm-project?rev=273737&view=rev
Log:
Fix unused variable warning in -asserts builds.
Modified:
llvm/trunk/lib/Transforms/IPO/CrossDSOCFI.cpp
Modified: llvm/trunk/lib/Transforms/IPO/CrossDSOCFI.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/CrossDSOCFI.cpp?rev=273737&r1=273736&r2=273737&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/CrossDSOCFI.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/CrossDSOCFI.cpp Fri Jun 24 16:37:11 2016
@@ -98,8 +98,7 @@ void CrossDSOCFI::buildCFICheck() {
GO.getMetadata(LLVMContext::MD_type, Types);
for (MDNode *Type : Types) {
// Sanity check. GO must not be a function declaration.
- auto F = dyn_cast<Function>(&GO);
- assert(!F || !F->isDeclaration());
+ assert(!isa<Function>(&GO) || !cast<Function>(&GO)->isDeclaration());
if (ConstantInt *TypeId = extractNumericTypeId(Type))
TypeIds.insert(TypeId->getZExtValue());
More information about the llvm-commits
mailing list