diff options
author | John McCall <rjmccall@apple.com> | 2010-02-04 05:44:44 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-02-04 05:44:44 +0000 |
commit | f82b4e85b1219295cad4b5851b035575bc293010 (patch) | |
tree | 4169a0c441add772fb7b0858759981aab063ac69 /lib/AST/TypePrinter.cpp | |
parent | 814e6b915450456eb2a1ba15d82fc7f8ae3bc8a6 (diff) |
Allow calling convention attributes to apply to types. Patch by Chip Davis!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95291 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/TypePrinter.cpp')
-rw-r--r-- | lib/AST/TypePrinter.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/AST/TypePrinter.cpp b/lib/AST/TypePrinter.cpp index 00b74bc21a..597ab37d2b 100644 --- a/lib/AST/TypePrinter.cpp +++ b/lib/AST/TypePrinter.cpp @@ -271,6 +271,19 @@ void TypePrinter::PrintFunctionProto(const FunctionProtoType *T, S += ")"; + switch(T->getCallConv()) { + case CC_Default: + default: break; + case CC_C: + S += " __attribute__((cdecl))"; + break; + case CC_X86StdCall: + S += " __attribute__((stdcall))"; + break; + case CC_X86FastCall: + S += " __attribute__((fastcall))"; + break; + } if (T->getNoReturnAttr()) S += " __attribute__((noreturn))"; |