ABI handling API changes.
- Lift CGFunctionInfo creation up to callers of EmitCall.
- Move isVariadic bit out of CGFunctionInfo, take as argument to
GetFunctionType instead.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63550 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGCall.h b/lib/CodeGen/CGCall.h
index fd6eb48..7ca5f26 100644
--- a/lib/CodeGen/CGCall.h
+++ b/lib/CodeGen/CGCall.h
@@ -54,23 +54,20 @@
/// CGFunctionInfo - Class to encapsulate the information about a
/// function definition.
class CGFunctionInfo {
- bool IsVariadic;
-
llvm::SmallVector<QualType, 16> ArgTypes;
public:
CGFunctionInfo(const FunctionTypeNoProto *FTNP);
CGFunctionInfo(const FunctionTypeProto *FTP);
CGFunctionInfo(const FunctionDecl *FD);
- CGFunctionInfo(const ObjCMethodDecl *MD,
- const ASTContext &Context);
- CGFunctionInfo(QualType ResTy, const CallArgList &Args,
- bool _IsVariadic);
-
- bool isVariadic() const { return IsVariadic; }
+ CGFunctionInfo(const ObjCMethodDecl *MD, const ASTContext &Context);
+ CGFunctionInfo(QualType ResTy, const CallArgList &Args);
+ CGFunctionInfo(QualType ResTy, const FunctionArgList &Args);
ArgTypeIterator argtypes_begin() const;
ArgTypeIterator argtypes_end() const;
+
+ QualType getReturnType() const { return ArgTypes[0]; }
};
} // end namespace CodeGen
} // end namespace clang