[llvm] [BOLT] Fix -Wunused-template (PR #222439)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 12:54:03 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-support
Author: Aiden Grossman (boomanaiden154)
<details>
<summary>Changes</summary>
This was enabled by default in LLVM 23.1.0. It was disabled in LLVM 23.1.1, but it makes sense to fix the outstanding issues given they are real.
---
Full diff: https://github.com/llvm/llvm-project/pull/222439.diff
2 Files Affected:
- (modified) bolt/lib/Core/BinaryFunction.cpp (-4)
- (modified) llvm/include/llvm/Support/GenericLoopInfoImpl.h (+2-2)
``````````diff
diff --git a/bolt/lib/Core/BinaryFunction.cpp b/bolt/lib/Core/BinaryFunction.cpp
index 99d6d27264fbe..8689e0d432ac0 100644
--- a/bolt/lib/Core/BinaryFunction.cpp
+++ b/bolt/lib/Core/BinaryFunction.cpp
@@ -169,10 +169,6 @@ bool shouldPrint(const BinaryFunction &Function) {
namespace llvm {
namespace bolt {
-template <typename R> static bool emptyRange(const R &Range) {
- return Range.begin() == Range.end();
-}
-
/// Gets debug line information for the instruction located at the given
/// address in the original binary. Returns an optional DebugLineTableRowRef
/// that references the corresponding row in the DWARF line table. Since binary
diff --git a/llvm/include/llvm/Support/GenericLoopInfoImpl.h b/llvm/include/llvm/Support/GenericLoopInfoImpl.h
index 5ac1c35957cfb..f710c2b8f1615 100644
--- a/llvm/include/llvm/Support/GenericLoopInfoImpl.h
+++ b/llvm/include/llvm/Support/GenericLoopInfoImpl.h
@@ -881,8 +881,8 @@ void addInnerLoopsToHeadersMap(DenseMap<BlockT *, const LoopT *> &LoopHeaders,
#ifndef NDEBUG
template <class BlockT, class LoopT>
-static void compareLoops(const LoopT *L, const LoopT *OtherL,
- DenseMap<BlockT *, const LoopT *> &OtherLoopHeaders) {
+void compareLoops(const LoopT *L, const LoopT *OtherL,
+ DenseMap<BlockT *, const LoopT *> &OtherLoopHeaders) {
BlockT *H = L->getHeader();
BlockT *OtherH = OtherL->getHeader();
assert(H == OtherH &&
``````````
</details>
https://github.com/llvm/llvm-project/pull/222439
More information about the llvm-commits
mailing list