From 995d6cc8f9f246e244f086cbb68ec1b4304eb9e3 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Fri, 24 Jun 2016 21:37:11 +0000 Subject: Fix unused variable warning in -asserts builds. llvm-svn: 273737 --- llvm/lib/Transforms/IPO/CrossDSOCFI.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/Transforms') diff --git a/llvm/lib/Transforms/IPO/CrossDSOCFI.cpp b/llvm/lib/Transforms/IPO/CrossDSOCFI.cpp index 99d58333954..d95ba327a9a 100644 --- a/llvm/lib/Transforms/IPO/CrossDSOCFI.cpp +++ b/llvm/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()); -- cgit v1.2.3