diff options
author | Alp Toker <alp@nuanti.com> | 2014-01-25 16:55:45 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2014-01-25 16:55:45 +0000 |
commit | 314cc81b8caacd6f9b3f74c4e32ac9403d8d4052 (patch) | |
tree | 4f031e0740266d6687313f6792788bb5af6352a0 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 68855fe3c912c1cf183fe01621ea4f38a2dd7752 (diff) | |
download | llvm-314cc81b8caacd6f9b3f74c4e32ac9403d8d4052.zip llvm-314cc81b8caacd6f9b3f74c4e32ac9403d8d4052.tar.gz llvm-314cc81b8caacd6f9b3f74c4e32ac9403d8d4052.tar.bz2 |
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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index db629bf..572f5ba 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/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<CXXMethodDecl>(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<FunctionType>(ty)->getResultType(); + type = cast<FunctionType>(ty)->getReturnType(); break; case Type::Paren: |