[llvm-commits] llvm-gcc4: use langhooks rather than front-end calls in i386.c
Devang Patel
dpatel at apple.com
Thu Jan 18 14:04:00 PST 2007
On Jan 17, 2007, at 12:55 PM, Duncan Sands wrote:
> The section of code marked "APPLE LOCAL CW asm blocks" contains calls
> to routines that only exist in the C-like front-ends (C, C++, ObjC).
> Some of them are equivalent to langhook calls - so use langhooks for
> those. This reduces the number of stubs needed to get non C-like
> languages compiling.
>
> Index: gcc.llvm.master/gcc/config/i386/i386.c
> ===================================================================
> --- gcc.llvm.master.orig/gcc/config/i386/i386.c 2007-01-17
> 21:41:50.000000000 +0100
> +++ gcc.llvm.master/gcc/config/i386/i386.c 2007-01-17
> 21:45:14.000000000 +0100
> @@ -19594,7 +19594,7 @@
> mode = SFmode;
>
> if (mode != VOIDmode)
> - type = c_common_type_for_mode (mode, 1);
> + type = lang_hooks.types.type_for_mode (mode, 1);
> }
>
> return type;
> @@ -19626,7 +19626,7 @@
> C_DECL_REGISTER (decl) = 1;
> DECL_HARD_REGISTER (decl) = 1;
> change_decl_assembler_name (decl, arg);
> - decl = pushdecl (decl);
> + decl = lang_hooks.decls.pushdecl (decl);
> }
> }
Applied, after adding "APPLE LOCAL llvm" markers.
-
Devang
More information about the llvm-commits
mailing list