aboutsummaryrefslogtreecommitdiffstats
path: root/ortho
diff options
context:
space:
mode:
Diffstat (limited to 'ortho')
-rw-r--r--ortho/debug/ortho_debug.private.ads3
-rw-r--r--ortho/gcc/ortho_gcc.ads5
-rw-r--r--ortho/gcc/ortho_gcc.private.ads3
-rw-r--r--ortho/llvm/Makefile6
-rw-r--r--ortho/llvm/ortho_llvm.ads5
-rw-r--r--ortho/llvm/ortho_llvm.private.ads3
-rw-r--r--ortho/mcode/Makefile2
-rw-r--r--ortho/mcode/ortho_mcode.ads6
-rw-r--r--ortho/mcode/ortho_mcode.private.ads4
-rw-r--r--ortho/ortho_nodes.common.ads2
10 files changed, 33 insertions, 6 deletions
diff --git a/ortho/debug/ortho_debug.private.ads b/ortho/debug/ortho_debug.private.ads
index 98424efdf..69ee16cf7 100644
--- a/ortho/debug/ortho_debug.private.ads
+++ b/ortho/debug/ortho_debug.private.ads
@@ -26,6 +26,9 @@ package Ortho_Debug is
procedure Finish;
private
+ -- This back-end supports nested subprograms.
+ Has_Nested_Subprograms : constant Boolean := True;
+
-- A node for a type.
type O_Tnode_Type (<>);
type O_Tnode is access O_Tnode_Type;
diff --git a/ortho/gcc/ortho_gcc.ads b/ortho/gcc/ortho_gcc.ads
index 6e46b6ddf..0afdc0887 100644
--- a/ortho/gcc/ortho_gcc.ads
+++ b/ortho/gcc/ortho_gcc.ads
@@ -44,6 +44,8 @@ package Ortho_Gcc is
O_Snode_Null : constant O_Snode;
O_Tnode_Null : constant O_Tnode;
+ -- True if the code generated supports nested subprograms.
+ Has_Nested_Subprograms : constant Boolean;
------------------------
-- Type definitions --
@@ -454,6 +456,9 @@ package Ortho_Gcc is
-- End of common part
private
+ -- GCC supports nested subprograms.
+ Has_Nested_Subprograms : constant Boolean := True;
+
pragma Convention (C, O_Storage);
-- pragma Convention (C, ON_Op_Kind);
diff --git a/ortho/gcc/ortho_gcc.private.ads b/ortho/gcc/ortho_gcc.private.ads
index 27526517a..cc2f556f0 100644
--- a/ortho/gcc/ortho_gcc.private.ads
+++ b/ortho/gcc/ortho_gcc.private.ads
@@ -24,6 +24,9 @@ use Ortho_Ident;
package Ortho_Gcc is
private
+ -- GCC supports nested subprograms.
+ Has_Nested_Subprograms : constant Boolean := True;
+
pragma Convention (C, O_Storage);
-- pragma Convention (C, ON_Op_Kind);
diff --git a/ortho/llvm/Makefile b/ortho/llvm/Makefile
index 2a4d7bd21..135dbdf4b 100644
--- a/ortho/llvm/Makefile
+++ b/ortho/llvm/Makefile
@@ -1,6 +1,6 @@
ortho_srcdir=..
-GNAT_FLAGS=-gnaty3befhkmr -gnata -gnatf -gnatwael
-CC=clang
+GNAT_FLAGS=-gnaty3befhkmr -gnata -gnatf -gnatwael -gnat05
+CXX=clang++ --std=c++11
LLVM_CONFIG=llvm-config
SED=sed
BE=llvm
@@ -13,7 +13,7 @@ $(ortho_exec): $(ortho_srcdir)/llvm/ortho_llvm.ads force llvm-cbindings.o
-largs llvm-cbindings.o `$(LLVM_CONFIG) --ldflags --libs --system-libs` -lc++ #-static
llvm-cbindings.o: $(ortho_srcdir)/llvm/llvm-cbindings.cpp
- $(CC) -c -I`$(LLVM_CONFIG) --includedir --cflags` -g -o $@ $<
+ $(CXX) -c -I`$(LLVM_CONFIG) --includedir --cflags` -g -o $@ $<
clean:
$(RM) -f *.o *.ali ortho_code_main
diff --git a/ortho/llvm/ortho_llvm.ads b/ortho/llvm/ortho_llvm.ads
index 30245b833..206188fb6 100644
--- a/ortho/llvm/ortho_llvm.ads
+++ b/ortho/llvm/ortho_llvm.ads
@@ -47,6 +47,8 @@ package Ortho_LLVM is
O_Snode_Null : constant O_Snode;
O_Tnode_Null : constant O_Tnode;
+ -- True if the code generated supports nested subprograms.
+ Has_Nested_Subprograms : constant Boolean;
------------------------
-- Type definitions --
@@ -457,6 +459,9 @@ package Ortho_LLVM is
-- End of common part
private
+ -- No support for nested subprograms in LLVM.
+ Has_Nested_Subprograms : constant Boolean := False;
+
use LLVM.Core;
type O_Tnode_Type (<>);
diff --git a/ortho/llvm/ortho_llvm.private.ads b/ortho/llvm/ortho_llvm.private.ads
index 976de00e1..30b86a447 100644
--- a/ortho/llvm/ortho_llvm.private.ads
+++ b/ortho/llvm/ortho_llvm.private.ads
@@ -27,6 +27,9 @@ package Ortho_LLVM is
procedure Finish_Debug;
private
+ -- No support for nested subprograms in LLVM.
+ Has_Nested_Subprograms : constant Boolean := False;
+
use LLVM.Core;
type O_Tnode_Type (<>);
diff --git a/ortho/mcode/Makefile b/ortho/mcode/Makefile
index 2970d600a..19d5d26aa 100644
--- a/ortho/mcode/Makefile
+++ b/ortho/mcode/Makefile
@@ -1,5 +1,5 @@
ortho_srcdir=..
-GNAT_FLAGS=-gnaty3befhkmr -gnata -gnatf -gnatwlcru
+GNAT_FLAGS=-gnaty3befhkmr -gnata -gnatf -gnatwlcru -gnat05
CC=gcc
BE=mcode
SED=sed
diff --git a/ortho/mcode/ortho_mcode.ads b/ortho/mcode/ortho_mcode.ads
index 1ee9d7e50..45e803690 100644
--- a/ortho/mcode/ortho_mcode.ads
+++ b/ortho/mcode/ortho_mcode.ads
@@ -51,6 +51,8 @@ package Ortho_Mcode is
O_Snode_Null : constant O_Snode;
O_Tnode_Null : constant O_Tnode;
+ -- True if the code generated supports nested subprograms.
+ Has_Nested_Subprograms : constant Boolean;
------------------------
-- Type definitions --
@@ -461,7 +463,9 @@ package Ortho_Mcode is
-- End of common part
private
- --- PUBLIC DECLARATIONS
+ -- MCode supports nested subprograms.
+ Has_Nested_Subprograms : constant Boolean := True;
+
type O_Tnode is new Ortho_Code.O_Tnode;
type O_Cnode is new Ortho_Code.O_Cnode;
type O_Dnode is new Ortho_Code.O_Dnode;
diff --git a/ortho/mcode/ortho_mcode.private.ads b/ortho/mcode/ortho_mcode.private.ads
index 5d3f70efc..1b414773f 100644
--- a/ortho/mcode/ortho_mcode.private.ads
+++ b/ortho/mcode/ortho_mcode.private.ads
@@ -31,7 +31,9 @@ package Ortho_Mcode is
procedure Free_All;
private
- --- PUBLIC DECLARATIONS
+ -- MCode supports nested subprograms.
+ Has_Nested_Subprograms : constant Boolean := True;
+
type O_Tnode is new Ortho_Code.O_Tnode;
type O_Cnode is new Ortho_Code.O_Cnode;
type O_Dnode is new Ortho_Code.O_Dnode;
diff --git a/ortho/ortho_nodes.common.ads b/ortho/ortho_nodes.common.ads
index bd573c0e9..178187482 100644
--- a/ortho/ortho_nodes.common.ads
+++ b/ortho/ortho_nodes.common.ads
@@ -38,6 +38,8 @@ package ORTHO_NODES is
O_Snode_Null : constant O_Snode;
O_Tnode_Null : constant O_Tnode;
+ -- True if the code generated supports nested subprograms.
+ Has_Nested_Subprograms : constant Boolean;
------------------------
-- Type definitions --