[llvm-commits] PATCH: PR4719 - llvm-gcc should not use duplicate definitions of the same inline function

Duncan Sands baldrick at free.fr
Mon Aug 17 03:27:50 PDT 2009


Hi,

> +/* LLVM LOCAL begin */
> +/* Don't use ill-defined extern-inline-with-non-inline-definition
> + */
> +#if 0
>  #if GCC_VERSION < 3004 || !defined (__cplusplus)

does this mean that llvm-gcc can no longer be built with gcc before
gcc-3.4?  Also, do you understand why the test checks
"defined (__cplusplus)"?

> +/* LLVM LOCAL begin */
> +/* Use static inline for exact_log2/floor_log2 */
> +
>  /* Return log2, or -1 if not exact.  */
> -extern int exact_log2                  (unsigned HOST_WIDE_INT);
> +static inline int exact_log2                  (unsigned HOST_WIDE_INT);
>  
>  /* Return floor of log2, with -1 for zero.  */
> -extern int floor_log2                  (unsigned HOST_WIDE_INT);
> +static inline int floor_log2                  (unsigned HOST_WIDE_INT);

Probably these should only be defined if the same test as above holds
(GCC_VERSION < 3004 ...).  In which case you wouldn't need the static
inline changes for this bit.

Ciao,

Duncan.



More information about the llvm-commits mailing list