[llvm] r338986 - [NFC] Fixed unused function warning
Mikael Holmén via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 6 01:04:39 PDT 2018
Hi David,
I think you need more stuff like this.
I get
../lib/Transforms/IPO/Inliner.cpp:370:34: error: unused function
'operator<<' [-Werror,-Wunused-function]
static std::basic_ostream<char> &operator<<(std::basic_ostream<char> &R,
when compiling without asserts so I suppose at least
static std::basic_ostream<char> &operator<<(std::basic_ostream<char> &R,
const ore::NV &Arg) {
return R << Arg.Val;
}
should also be placed within
#ifndef NDEBUG
...
#endif
Regards,
Mikael
On 08/06/2018 06:45 AM, David Bolvansky via llvm-commits wrote:
> Author: xbolva00
> Date: Sun Aug 5 21:45:46 2018
> New Revision: 338986
>
> URL: http://llvm.org/viewvc/llvm-project?rev=338986&view=rev
> Log:
> [NFC] Fixed unused function warning
>
> Modified:
> llvm/trunk/lib/Transforms/IPO/Inliner.cpp
>
> Modified: llvm/trunk/lib/Transforms/IPO/Inliner.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/Inliner.cpp?rev=338986&r1=338985&r2=338986&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/IPO/Inliner.cpp (original)
> +++ llvm/trunk/lib/Transforms/IPO/Inliner.cpp Sun Aug 5 21:45:46 2018
> @@ -388,11 +388,13 @@ RemarkT &operator<<(RemarkT &&R, const I
> return R;
> }
>
> +#ifndef NDEBUG
> static std::string inlineCostStr(const InlineCost &IC) {
> std::stringstream Remark;
> Remark << IC;
> return Remark.str();
> }
> +#endif
>
> /// Return the cost only if the inliner should attempt to inline at the given
> /// CallSite. If we return the cost, we will emit an optimisation remark later
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list