Skip to content

Instantly share code, notes, and snippets.

@joakim-noah
Last active August 29, 2015 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joakim-noah/09cf49bee3d82b03a54f to your computer and use it in GitHub Desktop.
Save joakim-noah/09cf49bee3d82b03a54f to your computer and use it in GitHub Desktop.
Have ddmd dump all imported symbols
diff --git a/src/dsymbol.d b/src/dsymbol.d
index 2a44469..b3f799e 100644
--- a/src/dsymbol.d
+++ b/src/dsymbol.d
@@ -1340,6 +1340,9 @@ public:
if (!s.isImport())
error(loc, "%s %s is private", s.kind(), s.toPrettyChars());
}
+ printf("found %s from %s:%d in %s:%d - '%s'\n", ident.toChars(),
+ loc.filename, loc.linnum, s.loc.filename, s.loc.linnum,
+ s.toChars());
return s;
}
}
diff --git a/src/mars.d b/src/mars.d
index dbb1e43..0d746b1 100644
--- a/src/mars.d
+++ b/src/mars.d
@@ -1705,6 +1705,8 @@ extern(C++) int tryMain(size_t argc, const(char)** argv)
Module.runDeferredSemantic3();
if (global.errors)
fatal();
+version(none)
+{
if (global.params.moduleDeps)
{
OutBuffer* ob = global.params.moduleDeps;
@@ -1872,7 +1874,9 @@ extern(C++) int tryMain(size_t argc, const(char)** argv)
}
}
}
- return status;
+}
+ backend_term();
+ return EXIT_SUCCESS;
}
int main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment