diff options
author | George Burgess IV <george.burgess.iv@gmail.com> | 2017-01-06 19:10:48 +0000 |
---|---|---|
committer | George Burgess IV <george.burgess.iv@gmail.com> | 2017-01-06 19:10:48 +0000 |
commit | 35cfca2e20c67e167060b5f00d352f64eda47b38 (patch) | |
tree | 9e55476efc3c7b5b60c98db97ba0e0892afd5357 /clang/lib | |
parent | 1d1f692158f0cd3f42919b5287ca60a54178199b (diff) | |
download | bcm5719-llvm-35cfca2e20c67e167060b5f00d352f64eda47b38.tar.gz bcm5719-llvm-35cfca2e20c67e167060b5f00d352f64eda47b38.zip |
Clean up redundant isa<T> before getAs<T>. NFC.
llvm-svn: 291264
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 9b96a59aec3..c7c61e0c8ec 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/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<FunctionNoProtoType>(FTy)) { - CanQual<FunctionNoProtoType> noProto = FTy.getAs<FunctionNoProtoType>(); + if (CanQual<FunctionNoProtoType> noProto = FTy.getAs<FunctionNoProtoType>()) { return arrangeLLVMFunctionInfo( noProto->getReturnType(), /*instanceMethod=*/false, /*chainCall=*/false, None, noProto->getExtInfo(), {},RequiredArgs::All); } - assert(isa<FunctionProtoType>(FTy)); - return arrangeFreeFunctionType(FTy.getAs<FunctionProtoType>(), FD); + return arrangeFreeFunctionType(FTy.castAs<FunctionProtoType>(), FD); } /// Arrange the argument and result information for the declaration or |