From 314cc81b8caacd6f9b3f74c4e32ac9403d8d4052 Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Sat, 25 Jan 2014 16:55:45 +0000 Subject: Rename getResultType() on function and method declarations to getReturnType() A return type is the declared or deduced part of the function type specified in the declaration. A result type is the (potentially adjusted) type of the value of an expression that calls the function. Rule of thumb: * Declarations have return types and parameters. * Expressions have result types and arguments. llvm-svn: 200082 --- clang/lib/CodeGen/CGBlocks.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'clang/lib/CodeGen/CGBlocks.cpp') diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index 3b5c8187530..e174f8595ba 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -1123,10 +1123,9 @@ CodeGenFunction::GenerateBlockFunction(GlobalDecl GD, // Create the function declaration. const FunctionProtoType *fnType = blockInfo.getBlockExpr()->getFunctionType(); - const CGFunctionInfo &fnInfo = - CGM.getTypes().arrangeFunctionDeclaration(fnType->getResultType(), args, - fnType->getExtInfo(), - fnType->isVariadic()); + const CGFunctionInfo &fnInfo = CGM.getTypes().arrangeFunctionDeclaration( + fnType->getReturnType(), args, fnType->getExtInfo(), + fnType->isVariadic()); if (CGM.ReturnTypeUsesSRet(fnInfo)) blockInfo.UsesStret = true; @@ -1140,7 +1139,7 @@ CodeGenFunction::GenerateBlockFunction(GlobalDecl GD, CGM.SetInternalFunctionAttributes(blockDecl, fn, fnInfo); // Begin generating the function. - StartFunction(blockDecl, fnType->getResultType(), fn, fnInfo, args, + StartFunction(blockDecl, fnType->getReturnType(), fn, fnInfo, args, blockInfo.getBlockExpr()->getBody()->getLocStart()); // Okay. Undo some of what StartFunction did. -- cgit v1.2.3