[llvm] 9456e7f - [ORC] Silence unused variable warnings.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 12 20:24:49 PST 2025


Author: Lang Hames
Date: 2025-02-13T15:24:43+11:00
New Revision: 9456e7fcdd8de6af6bcbc82c91e447729eb27af5

URL: https://github.com/llvm/llvm-project/commit/9456e7fcdd8de6af6bcbc82c91e447729eb27af5
DIFF: https://github.com/llvm/llvm-project/commit/9456e7fcdd8de6af6bcbc82c91e447729eb27af5.diff

LOG: [ORC] Silence unused variable warnings.

Added: 
    

Modified: 
    llvm/lib/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.cpp b/llvm/lib/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.cpp
index 5b5b2fe917192..7510079f87b84 100644
--- a/llvm/lib/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.cpp
@@ -59,6 +59,7 @@ static int (*RemoveFindDynamicUnwindSections)(void *) = nullptr;
 
 UnwindInfoManager::~UnwindInfoManager() {
   if (int Err = RemoveFindDynamicUnwindSections((void *)&findSections)) {
+    (void)Err; // Silence unused variable warning in release builds.
     LLVM_DEBUG({
       dbgs() << "Failed call to " << RemoveFnName << ": error = " << Err
              << "\n";
@@ -86,6 +87,7 @@ bool UnwindInfoManager::TryEnable() {
   Instance.reset(new UnwindInfoManager());
 
   if (auto Err = AddFn((void *)&findSections)) {
+    (void)Err; // Silence unused variable warning in release builds.
     LLVM_DEBUG({
       dbgs() << "Failed call to " << AddFnName << ": error = " << Err << "\n";
     });


        


More information about the llvm-commits mailing list