[llvm] r247252 - [Support] Fix the always_inline attribute macro to not include the

Aaron Ballman via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 07:10:41 PDT 2015


On Thu, Sep 10, 2015 at 4:29 AM, Chandler Carruth via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: chandlerc
> Date: Thu Sep 10 03:29:30 2015
> New Revision: 247252
>
> URL: http://llvm.org/viewvc/llvm-project?rev=247252&view=rev
> Log:
> [Support] Fix the always_inline attribute macro to not include the
> 'inline' specifier. That specifier may or may not be valid for a given
> function, or it may be required for correct linkage even when the
> compiler doesn't support the always_inline attribute.
>
> Modified:
>     llvm/trunk/include/llvm/Support/Compiler.h
>
> Modified: llvm/trunk/include/llvm/Support/Compiler.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Compiler.h?rev=247252&r1=247251&r2=247252&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Support/Compiler.h (original)
> +++ llvm/trunk/include/llvm/Support/Compiler.h Thu Sep 10 03:29:30 2015
> @@ -189,7 +189,7 @@
>  /// 3.4 supported this but is buggy in various cases and produces unimplemented
>  /// errors, just use it in GCC 4.0 and later.
>  #if __has_attribute(always_inline) || LLVM_GNUC_PREREQ(4, 0, 0)
> -#define LLVM_ATTRIBUTE_ALWAYS_INLINE inline __attribute__((always_inline))
> +#define LLVM_ATTRIBUTE_ALWAYS_INLINE __attribute__((always_inline))
>  #elif defined(_MSC_VER)
>  #define LLVM_ATTRIBUTE_ALWAYS_INLINE __forceinline
>  #else

This change has caused some new warnings to crop up. Perhaps these
functions should be marked with inline manually? If so, I wonder what
functions also need the same treatment.

/opt/llvm/build-llvm/src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:2411:1:
warning: always_inline function might not be inlinable [-Wattributes]
/opt/llvm/build-llvm/src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:2398:1:
warning: always_inline function might not be inlinable [-Wattributes]
/opt/llvm/build-llvm/src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:2390:1:
warning: always_inline function might not be inlinable [-Wattributes]
/opt/llvm/build-llvm/src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:2379:1:
warning: always_inline function might not be inlinable [-Wattributes]
/opt/llvm/build-llvm/src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:2368:1:
warning: always_inline function might not be inlinable [-Wattributes]
/opt/llvm/build-llvm/src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:2361:1:
warning: always_inline function might not be inlinable [-Wattributes]
/opt/llvm/build-llvm/src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:2351:1:
warning: always_inline function might not be inlinable [-Wattributes]
/opt/llvm/build-llvm/src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:2341:1:
warning: always_inline function might not be inlinable [-Wattributes]
/opt/llvm/build-llvm/src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:2333:1:
warning: always_inline function might not be inlinable [-Wattributes]
/opt/llvm/build-llvm/src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:2327:1:
warning: always_inline function might not be inlinable [-Wattributes]
/opt/llvm/build-llvm/src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:2320:1:
warning: always_inline function might not be inlinable [-Wattributes]
/opt/llvm/build-llvm/src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:2308:1:
warning: always_inline function might not be inlinable [-Wattributes]
/opt/llvm/build-llvm/src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:2297:1:
warning: always_inline function might not be inlinable [-Wattributes]
/opt/llvm/build-llvm/src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1971:1:
warning: always_inline function might not be inlinable [-Wattributes]

~Aaron


More information about the llvm-commits mailing list