[pkg-d-commits] [ldc] 08/74: Add internal global option to enable outputting of source line info

Matthias Klumpp mak at moszumanska.debian.org
Thu Jul 13 20:54:10 UTC 2017


This is an automated email from the git hooks/post-receive script.

mak pushed a commit to annotated tag v1.3.0-beta2
in repository ldc.

commit d61452c6a8a51b630b7a1a7792bc1fcc93240e5e
Author: Johan Engelen <jbc.engelen at gmail.com>
Date:   Wed May 3 00:10:52 2017 +0200

    Add internal global option to enable outputting of source line info
---
 ddmd/globals.d    | 2 ++
 ddmd/globals.h    | 2 ++
 gen/dibuilder.cpp | 3 ++-
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ddmd/globals.d b/ddmd/globals.d
index 64a3827..027c963 100644
--- a/ddmd/globals.d
+++ b/ddmd/globals.d
@@ -241,6 +241,8 @@ struct Param
         uint dwarfVersion;
 
         uint hashThreshold; // MD5 hash symbols larger than this threshold (0 = no hashing)
+
+        bool outputSourceLocations; // if true, output line tables.
     }
 }
 
diff --git a/ddmd/globals.h b/ddmd/globals.h
index f7b9d5e..2bf4b6d 100644
--- a/ddmd/globals.h
+++ b/ddmd/globals.h
@@ -231,6 +231,8 @@ struct Param
     uint32_t dwarfVersion;
 
     uint32_t hashThreshold; // MD5 hash symbols larger than this threshold (0 = no hashing)
+
+    bool outputSourceLocations; // if true, output line tables.
 #endif
 };
 
diff --git a/gen/dibuilder.cpp b/gen/dibuilder.cpp
index a207722..79267b8 100644
--- a/gen/dibuilder.cpp
+++ b/gen/dibuilder.cpp
@@ -9,6 +9,7 @@
 
 #include "gen/dibuilder.h"
 
+#include "driver/cl_options.h"
 #include "gen/functions.h"
 #include "gen/irstate.h"
 #include "gen/llvmhelpers.h"
@@ -82,7 +83,7 @@ bool ldc::DIBuilder::mustEmitFullDebugInfo() {
 
 bool ldc::DIBuilder::mustEmitLocationsDebugInfo() {
   // for -g -gc and -gline-tables-only
-  return global.params.symdebug > 0;
+  return (global.params.symdebug > 0) || global.params.outputSourceLocations;
 }
 
 ////////////////////////////////////////////////////////////////////////////////

-- 
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