From 21d01ea9b6f106371a131fd4676e798ff6382aab Mon Sep 17 00:00:00 2001 From: JF Bastien Date: Fri, 2 Aug 2019 22:02:25 +0000 Subject: Revert "Remove support for unsupported MSVC versions" Mismatched preprocessor, I'll fix in a follow-up. llvm-svn: 367728 --- llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp') diff --git a/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp b/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp index 7d0fa0f91e6..4e0b8587c61 100644 --- a/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp +++ b/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp @@ -73,7 +73,13 @@ static Error LoadDIA(CComPtr &DiaDataSource) { #if !defined(_MSC_VER) return llvm::make_error(pdb_error_code::dia_failed_loading); #else - const wchar_t *msdia_dll = L"msdia140.dll"; + const wchar_t *msdia_dll = nullptr; +#if _MSC_VER >= 1900 && _MSC_VER < 2000 + msdia_dll = L"msdia140.dll"; // VS2015 +#elif _MSC_VER >= 1800 + msdia_dll = L"msdia120.dll"; // VS2013 +#else +#error "Unknown Visual Studio version." #endif HRESULT HR; -- cgit v1.2.3