aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-12-12 18:49:32 +0100
committerTristan Gingold <tgingold@free.fr>2016-12-12 18:49:32 +0100
commit81b1d0385132829eb414ebf978ab2f8ecd46b580 (patch)
tree333fddd001f92629a36c674d7f4aee30aab71434 /src
parent9a0c7b4a7e7850187a81f1bf8c141a2567efe543 (diff)
downloadghdl-81b1d0385132829eb414ebf978ab2f8ecd46b580.tar.gz
ghdl-81b1d0385132829eb414ebf978ab2f8ecd46b580.tar.bz2
ghdl-81b1d0385132829eb414ebf978ab2f8ecd46b580.zip
ghdlprint: do not canon associations.
Diffstat (limited to 'src')
-rw-r--r--src/ghdldrv/ghdlprint.adb1
-rw-r--r--src/vhdl/canon.adb4
-rw-r--r--src/vhdl/canon.ads3
3 files changed, 8 insertions, 0 deletions
diff --git a/src/ghdldrv/ghdlprint.adb b/src/ghdldrv/ghdlprint.adb
index 093ba00a9..d228f2d1f 100644
--- a/src/ghdldrv/ghdlprint.adb
+++ b/src/ghdldrv/ghdlprint.adb
@@ -992,6 +992,7 @@ package body Ghdlprint is
Canon.Canon_Flag_Concurrent_Stmts := False;
Canon.Canon_Flag_Configurations := False;
Canon.Canon_Flag_Specification_Lists := False;
+ Canon.Canon_Flag_Associations := False;
-- Parse all files.
for I in Args'Range loop
diff --git a/src/vhdl/canon.adb b/src/vhdl/canon.adb
index e3c5d281f..693d561fe 100644
--- a/src/vhdl/canon.adb
+++ b/src/vhdl/canon.adb
@@ -871,6 +871,10 @@ package body Canon is
Found : Boolean;
begin
+ if not Canon_Flag_Associations then
+ return Association_Chain;
+ end if;
+
-- No argument, so return now.
if Interface_Chain = Null_Iir then
pragma Assert (Association_Chain = Null_Iir);
diff --git a/src/vhdl/canon.ads b/src/vhdl/canon.ads
index 7401c8402..869755472 100644
--- a/src/vhdl/canon.ads
+++ b/src/vhdl/canon.ads
@@ -31,6 +31,9 @@ package Canon is
-- If true, canon configuration.
Canon_Flag_Configurations : Boolean := True;
+ -- If true, canon associations (reorder, add open associations).
+ Canon_Flag_Associations : Boolean := True;
+
-- If true, canon lists in specifications.
Canon_Flag_Specification_Lists : Boolean := True;