aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/ABIInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/ABIInfo.h')
-rw-r--r--lib/CodeGen/ABIInfo.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/CodeGen/ABIInfo.h b/lib/CodeGen/ABIInfo.h
index 10e2f60c86..35780f1556 100644
--- a/lib/CodeGen/ABIInfo.h
+++ b/lib/CodeGen/ABIInfo.h
@@ -12,6 +12,7 @@
#include "clang/AST/Type.h"
#include "llvm/IR/Type.h"
+#include "llvm/IR/CallingConv.h"
namespace llvm {
class Value;
@@ -184,14 +185,24 @@ namespace clang {
class ABIInfo {
public:
CodeGen::CodeGenTypes &CGT;
+ protected:
+ llvm::CallingConv::ID RuntimeCC;
+ public:
+ ABIInfo(CodeGen::CodeGenTypes &cgt)
+ : CGT(cgt), RuntimeCC(llvm::CallingConv::C) {}
- ABIInfo(CodeGen::CodeGenTypes &cgt) : CGT(cgt) {}
virtual ~ABIInfo();
ASTContext &getContext() const;
llvm::LLVMContext &getVMContext() const;
const llvm::DataLayout &getDataLayout() const;
+ /// Return the calling convention to use for system runtime
+ /// functions.
+ llvm::CallingConv::ID getRuntimeCC() const {
+ return RuntimeCC;
+ }
+
virtual void computeInfo(CodeGen::CGFunctionInfo &FI) const = 0;
/// EmitVAArg - Emit the target dependent code to load a value of