]> granicus.if.org Git - llvm/commitdiff
[LoopFusion] Fix another -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off build
authorFangrui Song <maskray@google.com>
Wed, 28 Aug 2019 03:12:40 +0000 (03:12 +0000)
committerFangrui Song <maskray@google.com>
Wed, 28 Aug 2019 03:12:40 +0000 (03:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370156 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/LoopFuse.cpp

index 3892d09bc7d7eec700bac2bb85eccb76a1985f42..a323d80dbe68356c9118b2b0a5389260cf6423dd 100644 (file)
@@ -294,16 +294,6 @@ private:
   }
 };
 
-inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
-                                     const FusionCandidate &FC) {
-  if (FC.isValid())
-    OS << FC.Preheader->getName();
-  else
-    OS << "<Invalid>";
-
-  return OS;
-}
-
 struct FusionCandidateCompare {
   /// Comparison functor to sort two Control Flow Equivalent fusion candidates
   /// into dominance order.
@@ -355,6 +345,16 @@ using FusionCandidateSet = std::set<FusionCandidate, FusionCandidateCompare>;
 using FusionCandidateCollection = SmallVector<FusionCandidateSet, 4>;
 
 #if !defined(NDEBUG)
+static llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
+                                     const FusionCandidate &FC) {
+  if (FC.isValid())
+    OS << FC.Preheader->getName();
+  else
+    OS << "<Invalid>";
+
+  return OS;
+}
+
 static llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
                                      const FusionCandidateSet &CandSet) {
   for (const FusionCandidate &FC : CandSet)