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

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 2 15:12:54 PDT 2015



On 09/02/2015 03:00 PM, David Blaikie wrote:
>
>
> On Wed, Sep 2, 2015 at 2:57 PM, Philip Reames via llvm-commits 
> <llvm-commits at lists.llvm.org <mailto: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).
You are correct.  It's right between two class definitions.  I hadn't 
noticed that it was within a namespace.  I'll fix that in a moment.
>
>        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 <mailto: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/71718777/attachment.html>


More information about the llvm-commits mailing list