Skip to content

Commit bfc508f

Browse files
committed
remove friend, remove protected:
1 parent 80b50a6 commit bfc508f

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

include/dxc/Support/dxcapi.extval.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ class DxcDllExtValidationSupport {
66
// DxcompilerSupport manages the
77
// lifetime of dxcompiler.dll, while DxilExtValSupport
88
// manages the lifetime of dxil.dll
9-
protected:
109
dxc::DxcDllSupport DxcompilerSupport;
1110
dxc::DxcDllSupport DxilExtValSupport;
1211

1312
std::string DxilDllPath;
13+
HRESULT InitializeInternal(LPCSTR dllName, LPCSTR fnName);
1414

1515
public:
1616
std::string GetDxilDllPath() { return DxilDllPath; }
@@ -33,11 +33,10 @@ class DxcDllExtValidationSupport {
3333
HRESULT CreateInstance2(IMalloc *pMalloc, REFCLSID clsid, REFIID riid,
3434
IUnknown **pResult);
3535

36-
HRESULT InitializeInternal(LPCSTR dllName, LPCSTR fnName);
3736
HRESULT Initialize() {
3837
return InitializeInternal(kDxCompilerLib, "DxcCreateInstance");
3938
}
4039

41-
bool IsEnabled() const { return DxcompilerSupport.m_dll != nullptr; }
40+
bool IsEnabled() const { return DxcompilerSupport.IsEnabled(); }
4241
};
4342
} // namespace dxc

include/dxc/Support/dxcapi.use.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ extern const char *kDxilLib;
2121

2222
// Helper class to dynamically load the dxcompiler or a compatible libraries.
2323
class DxcDllSupport {
24-
friend class DxcDllExtValidationSupport;
2524

26-
protected:
2725
HMODULE m_dll;
2826
DxcCreateInstanceProc m_createFn;
2927
DxcCreateInstance2Proc m_createFn2;

lib/DxcSupport/dxcapi.extval.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ HRESULT DxcDllExtValidationSupport::CreateInstance2(IMalloc *pMalloc,
2626
HRESULT DxcDllExtValidationSupport::InitializeInternal(LPCSTR dllName,
2727
LPCSTR fnName) {
2828
// Load dxcompiler.dll
29-
HRESULT Result = DxcompilerSupport.InitializeInternal(dllName, fnName);
29+
HRESULT Result = DxcompilerSupport.InitializeForDll(dllName, fnName);
3030
// if dxcompiler.dll fails to load, return the failed HRESULT
3131
if (DXC_FAILED(Result)) {
3232
return Result;

0 commit comments

Comments
 (0)