Fix WIN32 buildwq
authorAnton Zhukov <a.zhukov@samsung.com>
Tue, 15 Oct 2019 12:48:43 +0000 (08:48 -0400)
committerAlexander Soldatov/Staff Engineer/AI Compiler Lab /SRR/Samsung Electronics <soldatov.a@samsung.com>
Wed, 20 Nov 2019 13:14:05 +0000 (16:14 +0300)
src/debug/netcoredbg/valuewalk.cpp

index 4e4ecb84bfbf693c2b171753536da059f2075a21..ca6f7df3ac3231ab4ccead27bb28c581b71b5a74 100644 (file)
@@ -337,8 +337,14 @@ HRESULT Evaluator::getObjectByFunction(
     IfFailRet(pValue2->GetExactType(&pType));
     ToRelease<ICorDebugFunction> pFunc;
 
+#ifdef WIN32
+    std::wstring wide_string = std::wstring(func.begin(), func.end());
+    WCHAR *methodName = const_cast<wchar_t*>(wide_string.c_str());
+#else
     std::u16string u16string(func.begin(), func.end());
     WCHAR* methodName = const_cast<char16_t*>(u16string.c_str());
+#endif // WIN32
+
     IfFailRet(FindMethod(pType, methodName, &pFunc));
 
     return EvalFunction(pThread, pFunc, pType, pInValue, ppOutValue);