From 37545f747c61382bbf5291d28a47fef6fc4d2d0e 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200082 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenFunction.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/CodeGen/CodeGenFunction.cpp') diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index db629bf492..572f5babd0 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -704,7 +704,7 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn, DebugInfo = NULL; // disable debug info indefinitely for this function FunctionArgList Args; - QualType ResTy = FD->getResultType(); + QualType ResTy = FD->getReturnType(); CurGD = GD; const CXXMethodDecl *MD = dyn_cast(FD); @@ -769,7 +769,7 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn, // If the '}' that terminates a function is reached, and the value of the // function call is used by the caller, the behavior is undefined. if (getLangOpts().CPlusPlus && !FD->hasImplicitReturnZero() && - !FD->getResultType()->isVoidType() && Builder.GetInsertBlock()) { + !FD->getReturnType()->isVoidType() && Builder.GetInsertBlock()) { if (SanOpts->Return) EmitCheck(Builder.getFalse(), "missing_return", EmitCheckSourceLocation(FD->getLocation()), @@ -1449,7 +1449,7 @@ void CodeGenFunction::EmitVariablyModifiedType(QualType type) { case Type::FunctionProto: case Type::FunctionNoProto: - type = cast(ty)->getResultType(); + type = cast(ty)->getReturnType(); break; case Type::Paren: -- cgit v1.2.3