[pkg-d-commits] [ldc] 10/95: Use upstream's new printPredefinedVersions()
Matthias Klumpp
mak at moszumanska.debian.org
Thu Jul 13 20:53:55 UTC 2017
This is an automated email from the git hooks/post-receive script.
mak pushed a commit to annotated tag v1.3.0-beta1
in repository ldc.
commit 3940f6f1c3afc5c758293fd8b1b6b333851faa54
Author: Martin <noone at nowhere.com>
Date: Sun Feb 19 01:40:42 2017 +0100
Use upstream's new printPredefinedVersions()
Resolves issue #1962.
---
ddmd/mars.d | 8 +++++++-
ddmd/mars.h | 1 +
driver/main.cpp | 20 +-------------------
3 files changed, 9 insertions(+), 20 deletions(-)
diff --git a/ddmd/mars.d b/ddmd/mars.d
index a4bcd51..8bd8a9a 100644
--- a/ddmd/mars.d
+++ b/ddmd/mars.d
@@ -2198,7 +2198,10 @@ private void addDefaultVersionIdentifiers()
printPredefinedVersions();
}
-private void printPredefinedVersions()
+} // !IN_LLVM
+
+// IN_LLVM replaced: `private` by `extern (C++)`
+extern (C++) void printPredefinedVersions()
{
if (global.params.verbose && global.params.versionids)
{
@@ -2210,6 +2213,9 @@ private void printPredefinedVersions()
}
+version (IN_LLVM) {} else
+{
+
/****************************************
* Determine the instruction set to be used.
* Params:
diff --git a/ddmd/mars.h b/ddmd/mars.h
index da42637..cf2b159 100644
--- a/ddmd/mars.h
+++ b/ddmd/mars.h
@@ -101,6 +101,7 @@ void ensurePathToNameExists(Loc loc, const char *name);
#if IN_LLVM
int mars_mainBody(Strings &files, Strings &libmodules);
+void printPredefinedVersions();
#endif
const char *importHint(const char *s);
diff --git a/driver/main.cpp b/driver/main.cpp
index e566d03..e2d483b 100644
--- a/driver/main.cpp
+++ b/driver/main.cpp
@@ -918,24 +918,6 @@ void registerPredefinedVersions() {
#undef STR
}
-/// Dump all predefined version identifiers.
-void dumpPredefinedVersions() {
- if (global.params.verbose && global.params.versionids) {
- fprintf(global.stdmsg, "predefs ");
- int col = 10;
- for (auto id : *global.params.versionids) {
- int len = strlen(id) + 1;
- if (col + len > 80) {
- col = 10;
- fprintf(global.stdmsg, "\n ");
- }
- col += len;
- fprintf(global.stdmsg, " %s", id);
- }
- fprintf(global.stdmsg, "\n");
- }
-}
-
} // anonymous namespace
int cppmain(int argc, char **argv) {
@@ -1039,7 +1021,7 @@ int cppmain(int argc, char **argv) {
void addDefaultVersionIdentifiers() {
registerPredefinedVersions();
- dumpPredefinedVersions();
+ printPredefinedVersions();
}
void codegenModules(Modules &modules) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git
More information about the pkg-d-commits
mailing list