[llvm] r246717 - Fix release build warning for unused function

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 2 15:00:10 PDT 2015


On Wed, Sep 2, 2015 at 2:57 PM, Philip Reames via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: reames
> Date: Wed Sep  2 16:57:17 2015
> New Revision: 246717
>
> URL: http://llvm.org/viewvc/llvm-project?rev=246717&view=rev
> Log:
> Fix release build warning for unused function
>
>
> Modified:
>     llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
>
> Modified: llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp?rev=246717&r1=246716&r2=246717&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp Wed Sep
> 2 16:57:17 2015
> @@ -616,11 +616,12 @@ private:
>    Value *base; // non null only if status == base
>  };
>
> +#ifndef NDEBUG
>  inline raw_ostream &operator<<(raw_ostream &OS, const BDVState &State) {
>

I assume this function is within an anonymous namespace? (otherwise
-Wunused-function wouldn't fire on it) - it's LLVM style to use "static"
for file-local functions (and only to use anonymous namespaces to wrap
types, not functions).


>    State.print(OS);
>    return OS;
>  }
> -
> +#endif
>
>  typedef DenseMap<Value *, BDVState> ConflictStateMapTy;
>  // Values of type BDVState form a lattice, and this is a helper
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150902/9ce1e160/attachment.html>


More information about the llvm-commits mailing list