From 8a380d8f16b6f7ddabc1598ce454c206c33bc661 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Fri, 24 Jun 2016 21:37:11 +0000 Subject: [PATCH] Fix unused variable warning in -asserts builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273737 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/CrossDSOCFI.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Transforms/IPO/CrossDSOCFI.cpp b/lib/Transforms/IPO/CrossDSOCFI.cpp index 99d58333954..d95ba327a9a 100644 --- a/lib/Transforms/IPO/CrossDSOCFI.cpp +++ b/lib/Transforms/IPO/CrossDSOCFI.cpp @@ -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(&GO); - assert(!F || !F->isDeclaration()); + assert(!isa(&GO) || !cast(&GO)->isDeclaration()); if (ConstantInt *TypeId = extractNumericTypeId(Type)) TypeIds.insert(TypeId->getZExtValue()); -- 2.50.1