summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/CBackend
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2006-09-17 20:25:45 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2006-09-17 20:25:45 +0000
commit6f7072c66a84a26644572efb1a0ba35bb7e70732 (patch)
treec3f37b02038c1aa88e40a67b768f86f21bb1347d /llvm/lib/Target/CBackend
parentf16dc007e652c6d935abef319db8f0cbc9912416 (diff)
downloadbcm5719-llvm-6f7072c66a84a26644572efb1a0ba35bb7e70732.tar.gz
bcm5719-llvm-6f7072c66a84a26644572efb1a0ba35bb7e70732.zip
Added some eye-candy for Subtarget type checking
Added X86 StdCall & FastCall calling conventions. Codegen will follow. llvm-svn: 30446
Diffstat (limited to 'llvm/lib/Target/CBackend')
-rw-r--r--llvm/lib/Target/CBackend/Writer.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/Target/CBackend/Writer.cpp b/llvm/lib/Target/CBackend/Writer.cpp
index 2aa36270bf2..23bd41d8dd0 100644
--- a/llvm/lib/Target/CBackend/Writer.cpp
+++ b/llvm/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());
OpenPOWER on IntegriCloud