diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index 50f483eac..0486125cf 100644 --- a/cmake/modules/HandleLLVMOptions.cmake +++ b/cmake/modules/HandleLLVMOptions.cmake @@ -56,10 +56,6 @@ int main() { return (float)x; }" endif() if( LLVM_ENABLE_ASSERTIONS ) - # MSVC doesn't like _DEBUG on release builds. See PR 4379. - if( NOT MSVC ) - add_definitions( -D_DEBUG ) - endif() set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDBG") # HLSL Change set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -UNDEBUG") # HLSL Change if (0) # HLSL Change Starts diff --git a/include/dxc/Support/WinAdapter.h b/include/dxc/Support/WinAdapter.h index 39007a432..99f83a65d 100644 --- a/include/dxc/Support/WinAdapter.h +++ b/include/dxc/Support/WinAdapter.h @@ -118,7 +118,7 @@ #define ERROR_OUT_OF_STRUCTURES ENOMEM #define ERROR_NOT_CAPABLE EPERM #define ERROR_NOT_FOUND ENOTSUP -#define ERROR_UNHANDLED_EXCEPTION EINTR +#define ERROR_UNHANDLED_EXCEPTION EBADF // Used by HRESULT <--> WIN32 error code conversion #define SEVERITY_ERROR 1 diff --git a/include/dxc/Test/WEXAdapter.h b/include/dxc/Test/WEXAdapter.h index 397b63e54..847665240 100644 --- a/include/dxc/Test/WEXAdapter.h +++ b/include/dxc/Test/WEXAdapter.h @@ -61,6 +61,14 @@ #define VERIFY_IS_GREATER_THAN_OR_EQUAL(greater, less) EXPECT_GE(greater, less) +#define VERIFY_IS_GREATER_THAN_2(greater, less) EXPECT_GT(greater, less) +#define VERIFY_IS_GREATER_THAN_3(greater, less, msg) EXPECT_GT(greater, less) << msg +#define VERIFY_IS_GREATER_THAN(...) MACRO_N(VERIFY_IS_GREATER_THAN_, __VA_ARGS__) + +#define VERIFY_IS_LESS_THAN_2(greater, less) EXPECT_LT(greater, less) +#define VERIFY_IS_LESS_THAN_3(greater, less, msg) EXPECT_LT(greater, less) << msg +#define VERIFY_IS_LESS_THAN(...) MACRO_N(VERIFY_IS_LESS_THAN_, __VA_ARGS__) + #define VERIFY_WIN32_BOOL_SUCCEEDED_1(expr) EXPECT_TRUE(expr) #define VERIFY_WIN32_BOOL_SUCCEEDED_2(expr, msg) EXPECT_TRUE(expr) << msg #define VERIFY_WIN32_BOOL_SUCCEEDED(...) MACRO_N(VERIFY_WIN32_BOOL_SUCCEEDED_, __VA_ARGS__) diff --git a/lib/DxcSupport/FileIOHelper.cpp b/lib/DxcSupport/FileIOHelper.cpp index 5070109b9..82482d242 100644 --- a/lib/DxcSupport/FileIOHelper.cpp +++ b/lib/DxcSupport/FileIOHelper.cpp @@ -217,7 +217,9 @@ static unsigned CharSizeFromCodePage(UINT32 codePage) { // We do not handle translation from these code page values. static bool IsUnsupportedUtfCodePage(UINT32 codePage) { switch (codePage) { +#ifdef _WIN32 case CP_UTF32LE: +#endif case CP_UTF32BE: case CP_UTF16BE: return true; @@ -473,7 +475,11 @@ static HRESULT CodePageBufferToUtf8(UINT32 codePage, LPCVOID bufferPointer, CDxcMallocHeapPtr utf16NewCopy(pMalloc); UINT32 utf16CharCount = 0; const WCHAR *utf16Chars = nullptr; +#if _WIN32 if (codePage == CP_UTF16) { +#else + if (codePage == CP_UTF16 || codePage == CP_UTF32LE) { +#endif if (!IsSizeWcharAligned(bufferSize)) throw hlsl::Exception(DXC_E_STRING_ENCODING_FAILED, "Error in encoding argument specified"); diff --git a/lib/HLSL/DxilCondenseResources.cpp b/lib/HLSL/DxilCondenseResources.cpp index 3836400fd..bf2c11cb3 100644 --- a/lib/HLSL/DxilCondenseResources.cpp +++ b/lib/HLSL/DxilCondenseResources.cpp @@ -1821,18 +1821,17 @@ bool UpdateStructTypeForLegacyLayout(DxilResourceBase &Res, Function *NF = hlslOP->GetOpFunc(hlsl::OP::OpCode::CreateHandleForLib, UpdatedST); // Replace old GV. - for (auto UserIt = Symbol->user_begin(); UserIt != Symbol->user_end();) { + for (auto UserIt = Symbol->user_begin(), userEnd = Symbol->user_end(); UserIt != userEnd;) { Value *User = *(UserIt++); if (LoadInst *ldInst = dyn_cast(User)) { if (!ldInst->user_empty()) { IRBuilder<> Builder = IRBuilder<>(ldInst); LoadInst *newLoad = Builder.CreateLoad(NewGV); - ArrayRef args = {hlslOP->GetI32Const((unsigned)hlsl::OP::OpCode::CreateHandleForLib), newLoad}; + Value *args[] = {hlslOP->GetI32Const((unsigned)hlsl::OP::OpCode::CreateHandleForLib), newLoad}; - for (auto user = ldInst->user_begin(); user != ldInst->user_end();) { + for (auto user = ldInst->user_begin(), E = ldInst->user_end(); user != E;) { CallInst *CI = cast(*(user++)); - CallInst *newCI = CallInst::Create(NF, args, "", CI); CI->replaceAllUsesWith(newCI); CI->eraseFromParent(); @@ -1945,7 +1944,7 @@ void ReplaceResourceUserWithHandle( DxilResource &res, LoadInst *load, Value *handle) { - for (auto resUser = load->user_begin(); resUser != load->user_end();) { + for (auto resUser = load->user_begin(), E = load->user_end(); resUser != E;) { Value *V = *(resUser++); CallInst *CI = dyn_cast(V); DxilInst_CreateHandleForLib createHandle(CI); diff --git a/lib/Support/regfree.c b/lib/Support/regfree.c index dc2b4af90..c66861d9b 100644 --- a/lib/Support/regfree.c +++ b/lib/Support/regfree.c @@ -61,12 +61,12 @@ llvm_regfree(llvm_regex_t *preg) g->magic = 0; /* mark it invalid */ if (g->strip != NULL) - free((char *)g->strip); + regex_free((char *)g->strip); if (g->sets != NULL) - free((char *)g->sets); + regex_free((char *)g->sets); if (g->setbits != NULL) - free((char *)g->setbits); + regex_free((char *)g->setbits); if (g->must != NULL) - free(g->must); - free((char *)g); + regex_free(g->must); + regex_free((char *)g); } diff --git a/tools/clang/unittests/HLSL/CMakeLists.txt b/tools/clang/unittests/HLSL/CMakeLists.txt index 56b456ab9..2088f8802 100644 --- a/tools/clang/unittests/HLSL/CMakeLists.txt +++ b/tools/clang/unittests/HLSL/CMakeLists.txt @@ -59,13 +59,12 @@ set(HLSL_IGNORE_SOURCES PixTest.cpp RewriterTest.cpp ShaderOpTest.cpp - DxilContainerTest.cpp - ValidationTest.cpp - CompilerTest.cpp ) add_clang_unittest(clang-hlsl-tests AllocatorTest.cpp + CompilerTest.cpp + DxilContainerTest.cpp DxilModuleTest.cpp DxilResourceTests.cpp DXIsenseTest.cpp @@ -77,6 +76,7 @@ add_clang_unittest(clang-hlsl-tests OptionsTest.cpp SystemValueTest.cpp TestMain.cpp + ValidationTest.cpp VerifierTest.cpp ) diff --git a/tools/clang/unittests/HLSL/CompilerTest.cpp b/tools/clang/unittests/HLSL/CompilerTest.cpp index 3f06d39a2..c7901b5d1 100644 --- a/tools/clang/unittests/HLSL/CompilerTest.cpp +++ b/tools/clang/unittests/HLSL/CompilerTest.cpp @@ -25,12 +25,19 @@ #include "dxc/DxilContainer/DxilContainer.h" #include "dxc/Support/WinIncludes.h" #include "dxc/dxcapi.h" -#include "dxc/dxcpix.h" #ifdef _WIN32 +#include "dxc/dxcpix.h" #include #include #include "dia2.h" -#endif +#else // _WIN32 +#ifndef __ANDROID__ +#include +#define CaptureStackBackTrace(FramesToSkip, FramesToCapture, BackTrace, \ + BackTraceHash) \ + backtrace(BackTrace, FramesToCapture) +#endif // __ANDROID__ +#endif // _WIN32 #include "dxc/Test/HLSLTestData.h" #include "dxc/Test/HlslTestUtils.h" @@ -53,6 +60,22 @@ using namespace std; using namespace hlsl_test; + +// Examines a virtual filename to determine if it looks like a dir +// Based on whether the final path segment contains a dot +// Not ironclad, but good enough for testing +static bool LooksLikeDir(std::wstring fileName) { + for(int i = fileName.size() - 1; i > -1; i--) { + wchar_t ch = fileName[i]; + if (ch == L'\\' || ch == L'/') + return true; + if (ch == L'.') + return false; + } + // No divider, no dot, assume file + return false; +} + class TestIncludeHandler : public IDxcIncludeHandler { DXC_MICROCOM_REF_FIELD(m_dwRef) public: @@ -94,7 +117,15 @@ public: _In_ LPCWSTR pFilename, // Filename as written in #include statement _COM_Outptr_ IDxcBlob **ppIncludeSource // Resultant source object for included file ) override { - CallInfos.push_back(LoadSourceCallInfo(pFilename)); + + LoadSourceCallInfo callInfo = LoadSourceCallInfo(pFilename); + + // *nix will call stat() on dirs, which attempts to find it here + // This loader isn't meant for dirs, so return failure + if (LooksLikeDir(callInfo.Filename)) + return m_defaultErrorCode; + + CallInfos.push_back(callInfo); *ppIncludeSource = nullptr; if (callIndex >= CallResults.size()) { @@ -2835,8 +2866,10 @@ public: // breakpoint for i failure on NN alloc - m_FailAlloc == 1+VAL && m_AllocCount == NN // breakpoint for happy path for NN alloc - m_AllocCount == NN P->AllocAtCount = m_AllocCount; +#ifndef __ANDROID__ if (CaptureStacks) P->AllocFrameCount = CaptureStackBackTrace(1, StackFrameCount, P->AllocFrames, nullptr); +#endif // __ANDROID__ P->Size = cb; P->Self = P; return P + 1; @@ -2862,9 +2895,11 @@ public: m_Size -= P->Size; P->Entry.Flink->Blink = P->Entry.Blink; P->Entry.Blink->Flink = P->Entry.Flink; +#ifndef __ANDROID__ if (CaptureStacks) P->FreeFrameCount = CaptureStackBackTrace(1, StackFrameCount, P->FreeFrames, nullptr); +#endif // __ANDROID__ } virtual SIZE_T STDMETHODCALLTYPE GetSize( @@ -2896,7 +2931,12 @@ public: #if _ITERATOR_DEBUG_LEVEL==0 // CompileWhenNoMemThenOOM can properly detect leaks only when debug iterators are disabled +#ifdef _WIN32 TEST_F(CompilerTest, CompileWhenNoMemThenOOM) { +#else +// Disabled it is ignored above +TEST_F(CompilerTest, DISABLED_CompileWhenNoMemThenOOM) { +#endif WEX::TestExecution::SetVerifyOutput verifySettings(WEX::TestExecution::VerifyOutputSettings::LogOnlyFailures); CComPtr pSource; @@ -3391,6 +3431,7 @@ TEST_F(CompilerTest, CodeGenVectorAtan2) { CodeGenTestCheck(L"atan2_vector_argument.hlsl"); } +#ifdef _WIN32 // Reflection unsupported TEST_F(CompilerTest, LibGVStore) { CComPtr pCompiler; CComPtr pResult; @@ -3466,6 +3507,7 @@ TEST_F(CompilerTest, LibGVStore) { std::wstring Text = BlobToUtf16(pTextBlob); VERIFY_ARE_NOT_EQUAL(std::wstring::npos, Text.find(L"store")); } +#endif // WIN32 - Reflection unsupported TEST_F(CompilerTest, PreprocessWhenValidThenOK) { CComPtr pCompiler; @@ -3739,6 +3781,7 @@ TEST_F(CompilerTest, DISABLED_ManualFileCheckTest) { } +#ifdef _WIN32 // Reflection unsupported TEST_F(CompilerTest, CodeGenHashStability) { CodeGenTestCheckBatchHash(L""); } @@ -3746,6 +3789,7 @@ TEST_F(CompilerTest, CodeGenHashStability) { TEST_F(CompilerTest, BatchD3DReflect) { CodeGenTestCheckBatchDir(L"d3dreflect"); } +#endif // WIN32 - Reflection unsupported TEST_F(CompilerTest, BatchDxil) { CodeGenTestCheckBatchDir(L"dxil"); @@ -3772,7 +3816,7 @@ TEST_F(CompilerTest, BatchValidation) { } TEST_F(CompilerTest, BatchPIX) { - CodeGenTestCheckBatchDir(L"PIX"); + CodeGenTestCheckBatchDir(L"pix"); } TEST_F(CompilerTest, BatchSamples) { diff --git a/tools/clang/unittests/HLSL/DxilContainerTest.cpp b/tools/clang/unittests/HLSL/DxilContainerTest.cpp index e8b1ed632..3ed11d779 100644 --- a/tools/clang/unittests/HLSL/DxilContainerTest.cpp +++ b/tools/clang/unittests/HLSL/DxilContainerTest.cpp @@ -122,7 +122,7 @@ public: UINT32 codePage, _Outptr_ IDxcBlobEncoding **ppBlob) { CComPtr library; IFT(m_dllSupport.CreateInstance(CLSID_DxcLibrary, &library)); - IFT(library->CreateBlobWithEncodingFromPinned((LPBYTE)data, size, codePage, + IFT(library->CreateBlobWithEncodingFromPinned(data, size, codePage, ppBlob)); } @@ -351,9 +351,7 @@ public: VERIFY_ARE_EQUAL(testZ, baseZ); } } -#endif // _WIN32 - Reflection unsupported -#ifdef _WIN32 // - Reflection unsupported HRESULT CompileFromFile(LPCWSTR path, bool useDXBC, UINT fxcFlags, IDxcBlob **ppBlob) { std::vector parts; @@ -793,6 +791,7 @@ TEST_F(DxilContainerTest, CompileWhenSigSquareThenIncludeSplit) { #endif } +#ifdef _WIN32 // - Reflection unsupported TEST_F(DxilContainerTest, CompileAS_CheckPSV0) { if (m_ver.SkipDxilVersion(1, 5)) return; const char asSource[] = @@ -1553,6 +1552,7 @@ TEST_F(DxilContainerTest, DxcUtils_CreateReflection) { } } } +#endif // _WIN32 - Reflection unsupported TEST_F(DxilContainerTest, CompileWhenOKThenIncludesFeatureInfo) { CComPtr pCompiler; diff --git a/tools/clang/unittests/HLSL/HLSLTestOptions.h b/tools/clang/unittests/HLSL/HLSLTestOptions.h index 64276cf89..8e05c2fa9 100644 --- a/tools/clang/unittests/HLSL/HLSLTestOptions.h +++ b/tools/clang/unittests/HLSL/HLSLTestOptions.h @@ -37,7 +37,7 @@ namespace testOptions { ARGOP(ExperimentalShaders)\ ARGOP(DebugLayer)\ ARGOP(SuitePath)\ - ARGOP(InputFile) + ARGOP(InputPath) ARG_LIST(ARG_DECLARE) diff --git a/tools/clang/unittests/HLSL/ValidationTest.cpp b/tools/clang/unittests/HLSL/ValidationTest.cpp index 78daa91f9..551813159 100644 --- a/tools/clang/unittests/HLSL/ValidationTest.cpp +++ b/tools/clang/unittests/HLSL/ValidationTest.cpp @@ -349,7 +349,7 @@ public: CA2W shWide(pShaderModel, CP_UTF8); - wchar_t *pEntryName = L"main"; + const wchar_t *pEntryName = L"main"; llvm::StringRef stage; unsigned RequiredDxilMajor = 1, RequiredDxilMinor = 0; diff --git a/tools/clang/unittests/HLSLTestLib/CMakeLists.txt b/tools/clang/unittests/HLSLTestLib/CMakeLists.txt index c50942ead..0d4b331e4 100644 --- a/tools/clang/unittests/HLSLTestLib/CMakeLists.txt +++ b/tools/clang/unittests/HLSLTestLib/CMakeLists.txt @@ -12,10 +12,10 @@ add_clang_library(HLSLTestLib else(WIN32) set(HLSL_IGNORE_SOURCES D3DReflectionDumper.cpp - FileCheckerTest.cpp ) add_clang_library(HLSLTestLib DxcTestUtils.cpp + FileCheckerTest.cpp FileCheckForTest.cpp ) include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include) diff --git a/tools/clang/unittests/HLSLTestLib/FileCheckerTest.cpp b/tools/clang/unittests/HLSLTestLib/FileCheckerTest.cpp index 0e97ef612..66fb5da70 100644 --- a/tools/clang/unittests/HLSLTestLib/FileCheckerTest.cpp +++ b/tools/clang/unittests/HLSLTestLib/FileCheckerTest.cpp @@ -25,7 +25,7 @@ #include #endif -#include "dxc/Test/HlslTestData.h" +#include "dxc/Test/HLSLTestData.h" #include "dxc/Test/HlslTestUtils.h" #include "dxc/Test/DxcTestUtils.h" @@ -41,13 +41,16 @@ #include "dxc/Support/Unicode.h" #include "dxc/Support/microcom.h" #include "dxc/DxilContainer/DxilContainer.h" + +#ifdef _WIN32 // Reflection unsupported #include "dxc/Test/D3DReflectionDumper.h" #include "d3d12shader.h" +using namespace refl_dump; +#endif // WIN32 - Reflection unsupported using namespace std; using namespace hlsl_test; -using namespace refl_dump; FileRunCommandPart::FileRunCommandPart(const std::string &command, const std::string &arguments, LPCWSTR commandFileName) : Command(command), Arguments(arguments), CommandFileName(commandFileName) { } @@ -103,13 +106,25 @@ FileRunCommandResult FileRunCommandPart::Run(dxc::DxcDllSupport &DllSupport, con return RunOpt(DllSupport, Prior); } else if (0 == _stricmp(Command.c_str(), "%D3DReflect")) { +#ifdef _WIN32 // Reflection unsupported return RunD3DReflect(DllSupport, Prior); +#else + FileRunCommandResult result = FileRunCommandResult::Success("Can't run D3DReflect on non-windows, so just assuming success"); + result.AbortPipeline = true; + return result; +#endif // WIN32 - Reflection unsupported } else if (0 == _stricmp(Command.c_str(), "%dxr")) { return RunDxr(DllSupport, Prior); } else if (0 == _stricmp(Command.c_str(), "%dxl")) { +#ifdef _WIN32 // Linking unsupported return RunLink(DllSupport, Prior); +#else + FileRunCommandResult result = FileRunCommandResult::Success("Can't run dxl on non-windows, so just assuming success"); + result.AbortPipeline = true; + return result; +#endif // WIN32 - Linking unsupported } else if (pPluginToolsPaths != nullptr) { auto it = pPluginToolsPaths->find(Command.c_str()); @@ -208,52 +223,6 @@ FileRunCommandResult FileRunCommandPart::ReadOptsForDxc( return FileRunCommandResult::Success(""); } -static HRESULT ReAssembleTo(dxc::DxcDllSupport &DllSupport, void *bitcode, UINT32 size, IDxcBlob **pBlob) { - CComPtr pAssembler; - CComPtr pLibrary; - IFT(DllSupport.CreateInstance(CLSID_DxcLibrary, &pLibrary)); - IFT(DllSupport.CreateInstance(CLSID_DxcAssembler, &pAssembler)); - - CComPtr pInBlob; - - IFT(pLibrary->CreateBlobWithEncodingFromPinned(bitcode, size, 0, &pInBlob)); - - CComPtr pResult; - pAssembler->AssembleToContainer(pInBlob, &pResult); - - HRESULT Result = 0; - IFT(pResult->GetStatus(&Result)); - IFT(Result); - - IFT(pResult->GetResult(pBlob)); - - return S_OK; -} - -static HRESULT GetDxilBitcode(dxc::DxcDllSupport &DllSupport, IDxcBlob *pCompiledBlob, IDxcBlob **pBitcodeBlob) { - CComPtr pReflection; - CComPtr pLibrary; - IFT(DllSupport.CreateInstance(CLSID_DxcContainerReflection, &pReflection)); - IFT(DllSupport.CreateInstance(CLSID_DxcLibrary, &pLibrary)); - - IFT(pReflection->Load(pCompiledBlob)); - - UINT32 uIndex = 0; - IFT(pReflection->FindFirstPartKind(hlsl::DFCC_DXIL, &uIndex)); - CComPtr pPart; - IFT(pReflection->GetPartContent(uIndex, &pPart)); - - auto header = (hlsl::DxilProgramHeader*)pPart->GetBufferPointer(); - void *bitcode = (char *)&header->BitcodeHeader + header->BitcodeHeader.BitcodeOffset; - UINT32 bitcode_size = header->BitcodeHeader.BitcodeSize; - - CComPtr pBlob; - IFT(pLibrary->CreateBlobWithEncodingFromPinned(bitcode, bitcode_size, 0, &pBlob)); - *pBitcodeBlob = pBlob.Detach(); - - return S_OK; -} - // Simple virtual file system include handler for test, fall back to default include handler class IncludeHandlerVFSOverlayForTest : public IDxcIncludeHandler { private: @@ -686,6 +655,7 @@ FileRunCommandResult FileRunCommandPart::RunOpt(dxc::DxcDllSupport &DllSupport, return FileRunCommandResult::Success(BlobToUtf8(pOutputText)); } +#ifdef _WIN32 // Reflection unsupported FileRunCommandResult FileRunCommandPart::RunD3DReflect(dxc::DxcDllSupport &DllSupport, const FileRunCommandResult *Prior) { std::string args(strtrim(Arguments)); if (args != "%s") @@ -758,6 +728,7 @@ FileRunCommandResult FileRunCommandPart::RunD3DReflect(dxc::DxcDllSupport &DllSu return FileRunCommandResult::Success(ss.str()); } +#endif // _WIN32 - Reflection unsupported FileRunCommandResult FileRunCommandPart::RunDxr(dxc::DxcDllSupport &DllSupport, const FileRunCommandResult *Prior) { // Support piping stdin from prior if needed. @@ -930,7 +901,7 @@ FileRunCommandResult FileRunCommandPart::RunTee(const FileRunCommandResult *Prio void FileRunCommandPart::SubstituteFilenameVars(std::string &args) { size_t pos; - std::string baseFileName = CW2A(CommandFileName); + std::string baseFileName = LPSTR(CW2A(CommandFileName)); if ((pos = baseFileName.find_last_of(".")) != std::string::npos) { baseFileName = baseFileName.substr(0, pos); } @@ -1232,7 +1203,7 @@ FileRunTestResult FileRunTestResult::RunHashTestFromFileCommands(LPCWSTR fileNam IFT(dllSupport.Initialize()); FileRunTestResultImpl result(dllSupport); result.RunHashTestFromFileCommands(fileName); - return result; + return std::move(result); } FileRunTestResult FileRunTestResult::RunFromFileCommands(LPCWSTR fileName, @@ -1242,7 +1213,7 @@ FileRunTestResult FileRunTestResult::RunFromFileCommands(LPCWSTR fileName, IFT(dllSupport.Initialize()); FileRunTestResultImpl result(dllSupport, pPluginToolsPaths, dumpName); result.RunFileCheckFromFileCommands(fileName); - return result; + return std::move(result); } FileRunTestResult FileRunTestResult::RunFromFileCommands(LPCWSTR fileName, dxc::DxcDllSupport &dllSupport, @@ -1250,7 +1221,7 @@ FileRunTestResult FileRunTestResult::RunFromFileCommands(LPCWSTR fileName, dxc:: LPCWSTR dumpName /*=nullptr*/) { FileRunTestResultImpl result(dllSupport, pPluginToolsPaths, dumpName); result.RunFileCheckFromFileCommands(fileName); - return result; + return std::move(result); } void ParseCommandParts(LPCSTR commands, LPCWSTR fileName,