Fixed unused variable warning.
authorMikhail Goncharov <goncharov.mikhail@gmail.com>
Tue, 28 Jun 2022 09:44:16 +0000 (11:44 +0200)
committerMikhail Goncharov <goncharov.mikhail@gmail.com>
Tue, 28 Jun 2022 09:44:16 +0000 (11:44 +0200)
llvm/lib/Transforms/IPO/SampleContextTracker.cpp

index 52cdaa9..6859953 100644 (file)
@@ -415,6 +415,8 @@ ContextTrieNode &SampleContextTracker::promoteMergeContextSamplesTree(
   // the context profile in the base (context-less) profile.
   FunctionSamples *FromSamples = NodeToPromo.getFunctionSamples();
   assert(FromSamples && "Shouldn't promote a context without profile");
+  (void)FromSamples;  // Unused in release build.
+
   LLVM_DEBUG(dbgs() << "  Found context tree root to promote: "
                     << getContextString(&NodeToPromo) << "\n");