diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-06 20:24:06 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-06 20:24:06 +0000 |
commit | 95ec533a1d8c450f6c6c5e84fe85423960e13382 (patch) | |
tree | bfe77b0dccd50ed2f4b4e6299d4bc4eaafced6e7 /contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp | |
parent | 2b532af82919b9141e7fd04becf354a0a7dfa813 (diff) | |
parent | 7e7b6700743285c0af506ac6299ddf82ebd434b9 (diff) |
Merge llvm, clang, lld and lldb trunk r291274, and resolve conflicts.
Notes
Notes:
svn path=/projects/clang400-import/; revision=311544
Diffstat (limited to 'contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp b/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp index 9b96a59aec38..c7c61e0c8ecb 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp +++ b/contrib/llvm/tools/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 |