From 8dc751fddfd5052e23e51170699fb2bf2d242550 Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Fri, 6 Jan 2017 19:10:48 +0000 Subject: [PATCH] Clean up redundant isa before getAs. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291264 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGCall.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 9b96a59aec..c7c61e0c8e 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -393,15 +393,13 @@ CodeGenTypes::arrangeFunctionDeclaration(const FunctionDecl *FD) { // When declaring a function without a prototype, always use a // non-variadic type. - if (isa(FTy)) { - CanQual noProto = FTy.getAs(); + if (CanQual noProto = FTy.getAs()) { return arrangeLLVMFunctionInfo( noProto->getReturnType(), /*instanceMethod=*/false, /*chainCall=*/false, None, noProto->getExtInfo(), {},RequiredArgs::All); } - assert(isa(FTy)); - return arrangeFreeFunctionType(FTy.getAs(), FD); + return arrangeFreeFunctionType(FTy.castAs(), FD); } /// Arrange the argument and result information for the declaration or -- 2.40.0