changeset 568:f75b16f1e405

Automated merge with http://hg.dsource.org/projects/llvmdc
author Christian Kamm <kamm incasoftware de>
date Tue, 02 Sep 2008 19:14:37 +0200
parents 68d7df3f9b05 (diff) aaba4f7c6d8a (current diff)
children 926a03711ca8 cbd6c8073a32
files dmd/mars.c dmd/mars.h
diffstat 5 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/dmd/mars.c	Tue Sep 02 19:14:25 2008 +0200
+++ b/dmd/mars.c	Tue Sep 02 19:14:37 2008 +0200
@@ -337,6 +337,8 @@
 #error
 #endif /* linux */
 
+    assert(global.params.os != OSinvalid);
+
     //VersionCondition::addPredefinedGlobalIdent("D_Bits");
     VersionCondition::addPredefinedGlobalIdent("all");
 
@@ -786,6 +788,8 @@
         assert(0 && "Invalid arch");
     }
 
+    assert(global.params.cpu != ARCHinvalid);
+
     if (allowForceEndianness && global.params.forceBE) {
         VersionCondition::addPredefinedGlobalIdent("BigEndian");
         global.params.isLE = false;
--- a/dmd/mars.h	Tue Sep 02 19:14:25 2008 +0200
+++ b/dmd/mars.h	Tue Sep 02 19:14:37 2008 +0200
@@ -40,6 +40,7 @@
 // LLVMDC
 enum ARCH
 {
+    ARCHinvalid,
     ARCHx86,
     ARCHx86_64,
     ARCHppc,
@@ -48,6 +49,7 @@
 
 enum OS
 {
+    OSinvalid,
     OSLinux,
     OSWindows,
     OSMacOSX
--- a/gen/toobj.cpp	Tue Sep 02 19:14:25 2008 +0200
+++ b/gen/toobj.cpp	Tue Sep 02 19:14:37 2008 +0200
@@ -192,7 +192,7 @@
     if (global.params.disassemble) {
         Logger::println("Writing LLVM asm to: %s\n", llfile->name->toChars());
         std::ofstream aos(llpath.c_str());
-        ir.module->print(aos);
+        ir.module->print(aos, NULL);
     }
 
     delete ir.module;
--- a/runtime/internal/critical.c	Tue Sep 02 19:14:25 2008 +0200
+++ b/runtime/internal/critical.c	Tue Sep 02 19:14:37 2008 +0200
@@ -81,7 +81,7 @@
 #include	<stdlib.h>
 #include	<pthread.h>
 
-#if __APPLE__
+#if !linux
 #define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
 #endif
 
--- a/runtime/internal/monitor.c	Tue Sep 02 19:14:25 2008 +0200
+++ b/runtime/internal/monitor.c	Tue Sep 02 19:14:37 2008 +0200
@@ -127,7 +127,7 @@
 
 #if USE_PTHREADS
 
-#if __APPLE__
+#if !linux
 #define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
 #endif