[Lldb-commits] [lldb] [LLDB][PDB] Warn if DIA plugin is requested but not available (PR #160067)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 23 02:10:33 PDT 2025
================
@@ -105,24 +106,21 @@ enum {
#include "SymbolFilePDBPropertiesEnum.inc"
};
-#if LLVM_ENABLE_DIA_SDK && defined(_WIN32)
-bool ShouldUseNativeReaderByDefault() {
- static bool g_use_native_by_default = true;
-
- static llvm::once_flag g_initialize;
- llvm::call_once(g_initialize, [] {
- llvm::StringRef env_value = ::getenv("LLDB_USE_NATIVE_PDB_READER");
- if (!env_value.equals_insensitive("on") &&
- !env_value.equals_insensitive("yes") &&
- !env_value.equals_insensitive("1") &&
- !env_value.equals_insensitive("true"))
- g_use_native_by_default = false;
- });
-
- return g_use_native_by_default;
-}
+static bool g_should_use_native_reader_by_default = [] {
----------------
Michael137 wrote:
```suggestion
static const bool g_should_use_native_reader_by_default = [] {
```
https://github.com/llvm/llvm-project/pull/160067
More information about the lldb-commits
mailing list