comparison dmd/mars.c @ 55:0ccfae271c45 trunk

[svn r59] Added support for C-style variadic functions. Currently only works on x86, x86-64 va_arg is broken in LLVM 2.1. PPC and PPC64 unknown. Updates to runtime. Rebuild!
author lindquist
date Wed, 24 Oct 2007 22:18:06 +0200
parents 0c77619e803b
children 70d6113eeb8c
comparison
equal deleted inserted replaced
54:28e99b04a132 55:0ccfae271c45
13 #include <stdlib.h> 13 #include <stdlib.h>
14 #include <ctype.h> 14 #include <ctype.h>
15 #include <assert.h> 15 #include <assert.h>
16 #include <limits.h> 16 #include <limits.h>
17 #include <string> 17 #include <string>
18 #include <vaarg.h>
18 19
19 #if _WIN32 20 #if _WIN32
20 #include <windows.h> 21 #include <windows.h>
21 long __cdecl __ehfilter(LPEXCEPTION_POINTERS ep); 22 long __cdecl __ehfilter(LPEXCEPTION_POINTERS ep);
22 #endif 23 #endif
665 } 666 }
666 else { 667 else {
667 global.params.llvmArch = const_cast<char*>(e->Name); 668 global.params.llvmArch = const_cast<char*>(e->Name);
668 if (global.params.verbose || very_verbose) 669 if (global.params.verbose || very_verbose)
669 printf("Default target found: %s\n", global.params.llvmArch); 670 printf("Default target found: %s\n", global.params.llvmArch);
671 if (very_verbose) {
672 int X = sizeof(va_list);
673 printf("valist.sizeof = %d\n", X);
674 }
670 } 675 }
671 } 676 }
672 677
673 if (strcmp(global.params.llvmArch,"x86")==0) { 678 if (strcmp(global.params.llvmArch,"x86")==0) {
674 VersionCondition::addPredefinedGlobalIdent("X86"); 679 VersionCondition::addPredefinedGlobalIdent("X86");