From: Peter Collingbourne Date: Fri, 24 Jun 2016 21:37:11 +0000 (+0000) Subject: Fix unused variable warning in -asserts builds. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8a380d8f16b6f7ddabc1598ce454c206c33bc661;p=llvm Fix unused variable warning in -asserts builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273737 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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());