diff dmd2/func.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 7d1e815b4f76
children 54b3c1394d62
line wrap: on
line diff
--- a/dmd2/func.c	Mon Jun 08 12:35:55 2009 +0200
+++ b/dmd2/func.c	Mon Jun 08 13:45:26 2009 +0200
@@ -87,6 +87,8 @@
     isArrayOp = false;
     allowInlining = false;
 
+    availableExternally = true; // assume this unless proven otherwise
+
     // function types in ldc don't merge if the context parameter differs
     // so we actually don't care about the function declaration, but only
     // what kind of context parameter it has.
@@ -672,6 +674,10 @@
 	return;
     semanticRun = 3;
 
+    // LDC
+    if (!global.params.useAvailableExternally)
+        availableExternally = false;
+
     if (!type || type->ty != Tfunction)
 	return;
     f = (TypeFunction *)(type);