diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2006-09-17 20:25:45 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2006-09-17 20:25:45 +0000 |
commit | bcb9770efe409f3291ce21269904744e7bf3397b (patch) | |
tree | 88414cb50a458549c4b76bc1f5c7b33cad02f991 /lib/Target/CBackend/Writer.cpp | |
parent | 2f463865c2f03b8835e35d3499fcd95eed922bc6 (diff) |
Added some eye-candy for Subtarget type checking
Added X86 StdCall & FastCall calling conventions. Codegen will follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30446 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CBackend/Writer.cpp')
-rw-r--r-- | lib/Target/CBackend/Writer.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index 2aa36270bf..23bd41d8dd 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/lib/Target/CBackend/Writer.cpp @@ -1278,7 +1278,15 @@ void CWriter::printFunctionSignature(const Function *F, bool Prototype) { if (F->hasInternalLinkage()) Out << "static "; if (F->hasDLLImportLinkage()) Out << "__declspec(dllimport) "; if (F->hasDLLExportLinkage()) Out << "__declspec(dllexport) "; - + switch (F->getCallingConv()) { + case CallingConv::X86_StdCall: + Out << "__stdcall "; + break; + case CallingConv::X86_FastCall: + Out << "__fastcall "; + break; + } + // Loop over the arguments, printing them... const FunctionType *FT = cast<FunctionType>(F->getFunctionType()); |