[llvm] 3cab3bc - [WebAssembly] Fix -Wunused-function (#194776)

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 20:29:03 PDT 2026


Author: Aiden Grossman
Date: 2026-04-28T21:28:58-06:00
New Revision: 3cab3bc6384b5f58cab7140d00d7a527eade010e

URL: https://github.com/llvm/llvm-project/commit/3cab3bc6384b5f58cab7140d00d7a527eade010e
DIFF: https://github.com/llvm/llvm-project/commit/3cab3bc6384b5f58cab7140d00d7a527eade010e.diff

LOG: [WebAssembly] Fix -Wunused-function (#194776)

After 4aee20b8caa9b8477aef94d10c37b2f00805de07, getBBName is only used
within an assertion so mark it [[maybe_unused]] so it does not cause a
-Wunused-function warning in non-asserts builds.

Added: 
    

Modified: 
    llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
index bd39d3562d764..71d4effcd4d67 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
@@ -1579,7 +1579,7 @@ static void splitEndLoopBB(MachineBasicBlock *EndTryTableBB) {
 
 // Print the BB name in the form of bb.NUMBER.ORIGINAL_NAME.
 // e.g., bb.3.catch.start
-static std::string getBBName(const MachineBasicBlock *MBB) {
+[[maybe_unused]] static std::string getBBName(const MachineBasicBlock *MBB) {
   std::string Name = "bb.";
   Name += Twine(MBB->getNumber()).str();
   if (MBB->getBasicBlock()) {


        


More information about the llvm-commits mailing list