https://github.com/alexrp created 
https://github.com/llvm/llvm-project/pull/146308

Needed to resolve this compilation error on some systems:

        lib/libunwind/src/UnwindCursor.hpp:153:38: error: return type of 
out-of-line definition of 'libunwind::DwarfFDECache::findFDE' differs from that 
in the declaration
    typename A::pint_t DwarfFDECache<A>::findFDE(pint_t mh, pint_t pc) {
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        lib/libunwind/src/libunwind.cpp:31:10: note: in file included from 
lib/libunwind/src/libunwind.cpp:31:
    #include "UnwindCursor.hpp"
             ^
        lib/libunwind/src/UnwindCursor.hpp:100:17: note: previous declaration 
is here
      static pint_t findFDE(pint_t mh, pint_t pc);
             ~~~~~~~^

From e07d50b61997b68c537a7bb19e5ed2b49fd90443 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= <a...@alexrp.com>
Date: Mon, 30 Jun 2025 06:34:44 +0200
Subject: [PATCH] [libunwind] Fix return type of DwarfFDECache::find() in
 definition

Needed to resolve this compilation error on some systems:

        lib/libunwind/src/UnwindCursor.hpp:153:38: error: return type of 
out-of-line definition of 'libunwind::DwarfFDECache::findFDE' differs from that 
in the declaration
    typename A::pint_t DwarfFDECache<A>::findFDE(pint_t mh, pint_t pc) {
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        lib/libunwind/src/libunwind.cpp:31:10: note: in file included from 
lib/libunwind/src/libunwind.cpp:31:
    #include "UnwindCursor.hpp"
             ^
        lib/libunwind/src/UnwindCursor.hpp:100:17: note: previous declaration 
is here
      static pint_t findFDE(pint_t mh, pint_t pc);
             ~~~~~~~^
---
 libunwind/src/UnwindCursor.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libunwind/src/UnwindCursor.hpp b/libunwind/src/UnwindCursor.hpp
index 55db035e62040..7586749cd2ad5 100644
--- a/libunwind/src/UnwindCursor.hpp
+++ b/libunwind/src/UnwindCursor.hpp
@@ -173,7 +173,7 @@ bool DwarfFDECache<A>::_registeredForDyldUnloads = false;
 #endif
 
 template <typename A>
-typename A::pint_t DwarfFDECache<A>::findFDE(pint_t mh, pint_t pc) {
+typename DwarfFDECache<A>::pint_t DwarfFDECache<A>::findFDE(pint_t mh, pint_t 
pc) {
   pint_t result = 0;
   _LIBUNWIND_LOG_IF_FALSE(_lock.lock_shared());
   for (entry *p = _buffer; p < _bufferUsed; ++p) {

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to