diff options
author | Tilmann Scheller <tilmann.scheller@googlemail.com> | 2011-03-02 19:36:23 +0000 |
---|---|---|
committer | Tilmann Scheller <tilmann.scheller@googlemail.com> | 2011-03-02 19:36:23 +0000 |
commit | 454464b491307a84ba8bc4aa8a05633984d8e2f7 (patch) | |
tree | a1a4d16370d306d62580da2f540671ed077a22b8 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | a3769f802179ff364e97050c3c4675ee2a503cb3 (diff) | |
download | llvm-454464b491307a84ba8bc4aa8a05633984d8e2f7.zip llvm-454464b491307a84ba8bc4aa8a05633984d8e2f7.tar.gz llvm-454464b491307a84ba8bc4aa8a05633984d8e2f7.tar.bz2 |
Add CC_Win64ThisCall and set it in the necessary places.
llvm-svn: 126863
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 4ab3277..9660b07 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/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<CXXDestructorDecl>(FD)) |