diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-02-08 09:49:26 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-02-08 09:49:26 +0000 |
commit | 318dc58878cc6f966cdbeb615ecf230f2d310a88 (patch) | |
tree | e52350ba9ac92c63b0e2195d5b36d33518b08fc9 | |
parent | 13294ea4e0f8d8939c15d96aa05f4b0db3d4c05d (diff) | |
download | gcc-318dc58878cc6f966cdbeb615ecf230f2d310a88.tar.gz |
* gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
detect primitive operations of tagged and untagged types.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@220513 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index ba21f435ed0..ef516a38be7 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2015-02-08 Eric Botcazou <ebotcazou@adacore.com> + + * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to + detect primitive operations of tagged and untagged types. + 2015-01-05 Eric Botcazou <ebotcazou@adacore.com> PR ada/64492 diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 95bc778b4bd..0f62af7a4f3 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -5510,16 +5510,17 @@ is_cplusplus_method (Entity_Id gnat_entity) if (Convention (gnat_entity) != Convention_CPP) return false; - /* This is the main case: C++ method imported as a primitive operation. */ - if (Is_Dispatching_Operation (gnat_entity)) + /* This is the main case: C++ method imported as a primitive operation. + Note that a C++ class with no virtual functions can be imported as a + limited record type so the operation is not necessarily dispatching. */ + if (Is_Primitive (gnat_entity)) return true; /* A thunk needs to be handled like its associated primitive operation. */ if (Is_Subprogram (gnat_entity) && Is_Thunk (gnat_entity)) return true; - /* C++ classes with no virtual functions can be imported as limited - record types, but we need to return true for the constructors. */ + /* A constructor is a method on the C++ side. */ if (Is_Constructor (gnat_entity)) return true; |