This revision was automatically updated to reflect the committed changes. Closed by commit rG908c11544212: [lldb/win] Default to native PDB reader when LLVM_ENABLE_DIA_SDK=NO (authored by thakis).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110172/new/ https://reviews.llvm.org/D110172 Files: lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp Index: lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp +++ lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp @@ -52,6 +52,10 @@ #include "Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.h" #include "Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h" +#if defined(_WIN32) +#include "llvm/Config/config.h" +#endif + using namespace lldb; using namespace lldb_private; using namespace llvm::pdb; @@ -83,14 +87,16 @@ static bool ShouldUseNativeReader() { #if defined(_WIN32) +#if LLVM_ENABLE_DIA_SDK llvm::StringRef use_native = ::getenv("LLDB_USE_NATIVE_PDB_READER"); - return use_native.equals_insensitive("on") || - use_native.equals_insensitive("yes") || - use_native.equals_insensitive("1") || - use_native.equals_insensitive("true"); -#else - return true; + if (!use_native.equals_insensitive("on") && + !use_native.equals_insensitive("yes") && + !use_native.equals_insensitive("1") && + !use_native.equals_insensitive("true")) + return false; +#endif #endif + return true; } void SymbolFilePDB::Initialize() {
Index: lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp +++ lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp @@ -52,6 +52,10 @@ #include "Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.h" #include "Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h" +#if defined(_WIN32) +#include "llvm/Config/config.h" +#endif + using namespace lldb; using namespace lldb_private; using namespace llvm::pdb; @@ -83,14 +87,16 @@ static bool ShouldUseNativeReader() { #if defined(_WIN32) +#if LLVM_ENABLE_DIA_SDK llvm::StringRef use_native = ::getenv("LLDB_USE_NATIVE_PDB_READER"); - return use_native.equals_insensitive("on") || - use_native.equals_insensitive("yes") || - use_native.equals_insensitive("1") || - use_native.equals_insensitive("true"); -#else - return true; + if (!use_native.equals_insensitive("on") && + !use_native.equals_insensitive("yes") && + !use_native.equals_insensitive("1") && + !use_native.equals_insensitive("true")) + return false; +#endif #endif + return true; } void SymbolFilePDB::Initialize() {
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits