From 88d117c2eedd7c5bec57ac983a98d5e12bdd2cc6 Mon Sep 17 00:00:00 2001 From: Tilmann Scheller Date: Wed, 2 Mar 2011 19:36:23 +0000 Subject: Add CC_Win64ThisCall and set it in the necessary places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126863 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenFunction.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/CodeGen/CodeGenFunction.cpp') diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index 4ab327712a..9660b071e2 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -211,7 +211,8 @@ void CodeGenFunction::EmitMCountInstrumentation() { void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, llvm::Function *Fn, const FunctionArgList &Args, - SourceLocation StartLoc) { + SourceLocation StartLoc, + CallingConv CC) { const Decl *D = GD.getDecl(); DidCallStackSave = false; @@ -278,7 +279,7 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, // FIXME: Leaked. // CC info is ignored, hopefully? CurFnInfo = &CGM.getTypes().getFunctionInfo(FnRetTy, Args, - FunctionType::ExtInfo()); + FunctionType::ExtInfo().withCallingConv(CC)); if (RetTy->isVoidType()) { // Void type; nothing to return. @@ -359,7 +360,7 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn) { if (Stmt *Body = FD->getBody()) BodyRange = Body->getSourceRange(); // Emit the standard function prologue. - StartFunction(GD, ResTy, Fn, Args, BodyRange.getBegin()); + StartFunction(GD, ResTy, Fn, Args, BodyRange.getBegin(), CC_Default); // Generate the body of the function. if (isa(FD)) -- cgit v1.2.3