[GVNSink] Don't define operator<< in NDEBUG
authorJames Molloy <james.molloy@arm.com>
Thu, 25 May 2017 13:11:18 +0000 (13:11 +0000)
committerJames Molloy <james.molloy@arm.com>
Thu, 25 May 2017 13:11:18 +0000 (13:11 +0000)
Without debug macros enabled, the raw_ostream operator<< overload
is unused.

llvm-svn: 303852

llvm/lib/Transforms/Scalar/GVNSink.cpp

index cd5b54b..a88c941 100644 (file)
@@ -174,12 +174,14 @@ struct SinkingInstructionCandidate {
   }
 };
 
+#ifndef NDEBUG
 llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
                               const SinkingInstructionCandidate &C) {
   OS << "<Candidate Cost=" << C.Cost << " #Blocks=" << C.NumBlocks
      << " #Insts=" << C.NumInstructions << " #PHIs=" << C.NumPHIs << ">";
   return OS;
 }
+#endif
 
 //===----------------------------------------------------------------------===//