Skip to content

Commit 0f77887

Browse files
[llvm-exegesis] Fix a warning
This patch fixes: llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp:602:6: error: unused function 'printInstructions' [-Werror,-Wunused-function]
1 parent 8071d27 commit 0f77887

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,7 @@ struct InstructionInfo {
598598
std::string HexBytes;
599599
};
600600

601+
#ifndef NDEBUG
601602
// Helper function to print generated assembly snippets
602603
void printInstructions(const std::vector<InstructionInfo> &Instructions,
603604
int InitialLinesCount, int LastLinesCount) {
@@ -622,6 +623,7 @@ void printInstructions(const std::vector<InstructionInfo> &Instructions,
622623
<< Instructions[i].HexBytes << Instructions[i].Text << '\n';
623624
dbgs() << "```\n";
624625
}
626+
#endif // NDEBUG
625627

626628
// Function to extract and print assembly from snippet
627629
Error printAssembledSnippet(const LLVMState &State,

0 commit comments

Comments
 (0)