[llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp
Anton Korobeynikov
asl at math.spbu.ru
Sun Sep 17 13:26:07 PDT 2006
Changes in directory llvm/lib/Target/CBackend:
Writer.cpp updated: 1.270 -> 1.271
---
Log message:
Added some eye-candy for Subtarget type checking
Added X86 StdCall & FastCall calling conventions. Codegen will follow.
---
Diffs of the changes: (+9 -1)
Writer.cpp | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletion(-)
Index: llvm/lib/Target/CBackend/Writer.cpp
diff -u llvm/lib/Target/CBackend/Writer.cpp:1.270 llvm/lib/Target/CBackend/Writer.cpp:1.271
--- llvm/lib/Target/CBackend/Writer.cpp:1.270 Thu Sep 14 13:23:26 2006
+++ llvm/lib/Target/CBackend/Writer.cpp Sun Sep 17 15:25:45 2006
@@ -1278,7 +1278,15 @@
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());
More information about the llvm-commits
mailing list