[clang] [clang][tools] Handle weak (and duplicate) symbols in clang-extdef-mapping (PR #222010)

Arseniy Zaostrovnykh via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 9 04:49:11 PDT 2026


=?utf-8?q?Balázs_Kéri?= <balazs.keri at ericsson.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/222010 at github.com>


================
@@ -43,25 +43,26 @@ class MapExtDefNamesConsumer : public ASTConsumer {
     CurrentFileName = astFilePath.str();
   }
 
-  ~MapExtDefNamesConsumer() {
-    // Flush results to standard output.
-    llvm::outs() << createCrossTUIndexString(Index);
-  }
----------------
necto wrote:

I fully support not doing functional work in destructors (with an exception of `llvm::scope_exit`). If you accept keeping the map-ext-def state scoped to the object rather than global, it would be nice to still keep the destructor as light as possible.

https://github.com/llvm/llvm-project/pull/222010


More information about the cfe-commits mailing list