diff dmd2/struct.c @ 1487:f62347c22d81

Apply changes from r1482 to D2 frontend too. Completely untested, but ldc2 compiles again.
author Frits van Bommel <fvbommel wxs.nl>
date Mon, 08 Jun 2009 13:45:26 +0200
parents 638d16625da2
children 54b3c1394d62
line wrap: on
line diff
--- a/dmd2/struct.c	Mon Jun 08 12:35:55 2009 +0200
+++ b/dmd2/struct.c	Mon Jun 08 13:45:26 2009 +0200
@@ -56,6 +56,10 @@
     aliasthis = NULL;
 #endif
     dtor = NULL;
+
+#if IN_LLVM
+    availableExternally = true; // assume this unless proven otherwise
+#endif
 }
 
 enum PROT AggregateDeclaration::prot()
@@ -85,6 +89,10 @@
 void AggregateDeclaration::semantic3(Scope *sc)
 {   int i;
 
+    // LDC
+    if (!global.params.useAvailableExternally)
+        availableExternally = false;
+
     //printf("AggregateDeclaration::semantic3(%s)\n", toChars());
     if (members)
     {