Skip to content

Commit 647c946

Browse files
committed
try E_INVALIDARG
1 parent bd01fa5 commit 647c946

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

lib/DxcSupport/dxcapi.extval.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,8 @@ HRESULT DxcDllExtValidationSupport::InitializeInternal(LPCSTR fnName) {
4242

4343
// Check if path is absolute and exists
4444
if (!DllPath.is_absolute() || !std::filesystem::exists(DllPath)) {
45-
// ERROR_DLL_INIT_FAILED
46-
return (HRESULT)1114L;
45+
return E_INVALIDARG;
4746
}
48-
// code that calls this function is responsible for checking
49-
// to see if dxil.dll is successfully loaded.
50-
// the DxilDllFailedToLoad function can determine whether there were any
51-
// problems loading dxil.dll or not
5247

5348
return DxilExtValSupport.InitializeForDll(DxilDllPath.c_str(), fnName);
5449
}

tools/clang/unittests/HLSL/ValidationTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4258,7 +4258,7 @@ TEST_F(ValidationTest, UnitTestExtValidationSupport) {
42584258
SetEnvVarW(L"DXC_DXIL_DLL_PATH", L"bogus");
42594259

42604260
if (!ExtSupportBogus.IsEnabled()) {
4261-
VERIFY_SUCCEEDED(ExtSupportBogus.Initialize());
4261+
VERIFY_FAILED(ExtSupportBogus.Initialize());
42624262
}
42634263

42644264
// validate that m_dllExtSupport2 was able to capture the environment

0 commit comments

Comments
 (0)