diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2019-08-10 05:25:44 +0000 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gcc.gnu.org> | 2019-08-10 05:25:44 +0000 |
commit | 740392538848e2c1b4535f3b6fc7e018930c0a64 (patch) | |
tree | efb68cac33dc5f9cbf7bc860ad671383c24a4165 /gcc | |
parent | 8fa64062ada5fad44a4c8161c03d7873c531ccad (diff) | |
download | gcc-740392538848e2c1b4535f3b6fc7e018930c0a64.zip gcc-740392538848e2c1b4535f3b6fc7e018930c0a64.tar.gz gcc-740392538848e2c1b4535f3b6fc7e018930c0a64.tar.bz2 |
Fix ODR violation in d/runtime.cc
gcc/d/ChangeLog:
PR d/90893
* runtime.cc (enum libcall_type): Rename to...
(enum d_libcall_type): ...this.
(get_libcall_type): Use d_libcall_type.
(build_libcall_decl): Likewise.
From-SVN: r274249
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/d/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/d/runtime.cc | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog index 51d1721..fb7b974 100644 --- a/gcc/d/ChangeLog +++ b/gcc/d/ChangeLog @@ -1,3 +1,11 @@ +2019-08-10 Iain Buclaw <ibuclaw@gdcproject.org> + + PR d/90893 + * runtime.cc (enum libcall_type): Rename to... + (enum d_libcall_type): ...this. + (get_libcall_type): Use d_libcall_type. + (build_libcall_decl): Likewise. + 2019-06-16 Iain Buclaw <ibuclaw@gdcproject.org> PR d/90559 diff --git a/gcc/d/runtime.cc b/gcc/d/runtime.cc index c2a5c55..72659ae 100644 --- a/gcc/d/runtime.cc +++ b/gcc/d/runtime.cc @@ -34,7 +34,7 @@ along with GCC; see the file COPYING3. If not see We represent them in the frontend here, however there's no guarantee that the compiler implementation actually matches the actual implementation. */ -enum libcall_type +enum d_libcall_type { LCT_VOID, /* void */ LCT_BYTE, /* byte */ @@ -81,7 +81,7 @@ static tree libcall_decls[LIBCALL_LAST]; arrayOf() will return cached types if they have been requested before. */ static Type * -get_libcall_type (libcall_type type) +get_libcall_type (d_libcall_type type) { if (libcall_types[type]) return libcall_types[type]; @@ -212,7 +212,7 @@ get_libcall_type (libcall_type type) the number of arguments, the types of which are provided in `...'. */ static tree -build_libcall_decl (const char *name, libcall_type return_type, +build_libcall_decl (const char *name, d_libcall_type return_type, int flags, int nparams, ...) { tree *args = XALLOCAVEC (tree, nparams); @@ -226,7 +226,7 @@ build_libcall_decl (const char *name, libcall_type return_type, for (int i = 0; i < nparams; i++) { - libcall_type ptype = (libcall_type) va_arg (ap, int); + d_libcall_type ptype = (d_libcall_type) va_arg (ap, int); Type *type = get_libcall_type (ptype); if (type == Type::tvoid) |