Address "always inline function is not always inlinable" warning with GCC.
authorEric Fiselier <eric@efcs.ca>
Tue, 17 Jul 2018 05:48:48 +0000 (05:48 +0000)
committerEric Fiselier <eric@efcs.ca>
Tue, 17 Jul 2018 05:48:48 +0000 (05:48 +0000)
commit81d0dbda79f8db7f64dc3c34ac544adac45f358c
tree96e2cfbf5c51e269ba0b3fec1b30872a4cbf7a6c
parentc376a1916b87e2c6330dc43cf9d49acf3ad33a3b
Address "always inline function is not always inlinable" warning with GCC.

When an always_inline function is used prior to the functions definition,
the compiler may not be able to inline it as requested by the attribute.
GCC flags the `basic_string(CharT const*)` function as one such example.

This patch supresses the warning, and the problem, by moving the
definition of the string constructor to the inline declaration.
This ensures the body is available when it is first ODR used.

llvm-svn: 337235
libcxx/include/string