Skip to content

Commit 45f74fa

Browse files
committed
perform rename
1 parent 5411894 commit 45f74fa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+215
-206
lines changed

include/dxc/Support/HLSLOptions.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class raw_ostream;
3636
} // namespace llvm
3737

3838
namespace dxc {
39-
class DxcDllSupport;
39+
class SpecificDllLoader;
4040
}
4141

4242
namespace hlsl {
@@ -313,9 +313,10 @@ int ReadDxcOpts(const llvm::opt::OptTable *optionTable, unsigned flagsToInclude,
313313
const MainArgs &argStrings, DxcOpts &opts,
314314
llvm::raw_ostream &errors);
315315

316-
/// Sets up the specified DxcDllSupport instance as per the given options.
317-
int SetupDxcDllSupport(const DxcOpts &opts, dxc::DxcDllSupport &dxcSupport,
318-
llvm::raw_ostream &errors);
316+
/// Sets up the specified SpecificDllLoader instance as per the given options.
317+
int SetupSpecificDllLoader(const DxcOpts &opts,
318+
dxc::SpecificDllLoader &dxcSupport,
319+
llvm::raw_ostream &errors);
319320

320321
void CopyArgsToWStrings(const llvm::opt::InputArgList &inArgs,
321322
unsigned flagsToInclude,

include/dxc/Support/dxcapi.extval.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
#include <string>
33

44
namespace dxc {
5-
class DxcDllExtValidationSupport : public IDllSupport {
5+
class DxcDllExtValidationLoader : public DllLoader {
66
// DxCompilerSupport manages the
77
// lifetime of dxcompiler.dll, while DxilExtValSupport
88
// manages the lifetime of dxil.dll
9-
dxc::DxcDllSupport DxCompilerSupport;
10-
dxc::DxcDllSupport DxilExtValSupport;
9+
dxc::SpecificDllLoader DxCompilerSupport;
10+
dxc::SpecificDllLoader DxilExtValSupport;
1111

1212
DxcCreateInstanceProc m_createFn;
1313
DxcCreateInstance2Proc m_createFn2;

include/dxc/Support/dxcapi.use.h

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ extern const char *kDxCompilerLib;
2020
extern const char *kDxilLib;
2121

2222
// Interface for common dll operations
23-
class IDllSupport {
23+
class DllLoader {
2424
public:
25-
IDllSupport() = default;
25+
DllLoader() = default;
2626

27-
IDllSupport(IDllSupport &&other) = default;
27+
DllLoader(DllLoader &&other) = default;
2828

29-
virtual ~IDllSupport() = default;
29+
virtual ~DllLoader() = default;
3030

3131
virtual HRESULT Initialize() = 0;
3232

@@ -63,7 +63,7 @@ class IDllSupport {
6363
};
6464

6565
// Helper class to dynamically load the dxcompiler or a compatible libraries.
66-
class DxcDllSupport : public IDllSupport {
66+
class SpecificDllLoader : public DllLoader {
6767

6868
HMODULE m_dll;
6969
DxcCreateInstanceProc m_createFn;
@@ -117,9 +117,10 @@ class DxcDllSupport : public IDllSupport {
117117
}
118118

119119
public:
120-
DxcDllSupport() : m_dll(nullptr), m_createFn(nullptr), m_createFn2(nullptr) {}
120+
SpecificDllLoader()
121+
: m_dll(nullptr), m_createFn(nullptr), m_createFn2(nullptr) {}
121122

122-
DxcDllSupport(DxcDllSupport &&other) {
123+
SpecificDllLoader(SpecificDllLoader &&other) {
123124
m_dll = other.m_dll;
124125
other.m_dll = nullptr;
125126
m_createFn = other.m_createFn;
@@ -128,7 +129,7 @@ class DxcDllSupport : public IDllSupport {
128129
other.m_createFn2 = nullptr;
129130
}
130131

131-
~DxcDllSupport() { Cleanup(); }
132+
~SpecificDllLoader() { Cleanup(); }
132133

133134
HRESULT Initialize() {
134135
return InitializeInternal(kDxCompilerLib, "DxcCreateInstance");
@@ -140,7 +141,7 @@ class DxcDllSupport : public IDllSupport {
140141

141142
// Also bring visibility into the interface definition of this function
142143
// which takes 2 args
143-
using IDllSupport::CreateInstance;
144+
using DllLoader::CreateInstance;
144145
HRESULT CreateInstance(REFCLSID clsid, REFIID riid, IUnknown **pResult) {
145146
if (pResult == nullptr)
146147
return E_POINTER;
@@ -152,7 +153,7 @@ class DxcDllSupport : public IDllSupport {
152153

153154
// Also bring visibility into the interface definition of this function
154155
// which takes 3 args
155-
using IDllSupport::CreateInstance2;
156+
using DllLoader::CreateInstance2;
156157
HRESULT CreateInstance2(IMalloc *pMalloc, REFCLSID clsid, REFIID riid,
157158
IUnknown **pResult) {
158159
if (pResult == nullptr)
@@ -208,8 +209,8 @@ inline DxcDefine GetDefine(LPCWSTR name, LPCWSTR value) {
208209
// Checks an HRESULT and formats an error message with the appended data.
209210
void IFT_Data(HRESULT hr, LPCWSTR data);
210211

211-
void EnsureEnabled(DxcDllSupport &dxcSupport);
212-
void ReadFileIntoBlob(DxcDllSupport &dxcSupport, LPCWSTR pFileName,
212+
void EnsureEnabled(SpecificDllLoader &dxcSupport);
213+
void ReadFileIntoBlob(SpecificDllLoader &dxcSupport, LPCWSTR pFileName,
213214
IDxcBlobEncoding **ppBlobEncoding);
214215
void WriteBlobToConsole(IDxcBlob *pBlob, DWORD streamType = STD_OUTPUT_HANDLE);
215216
void WriteBlobToFile(IDxcBlob *pBlob, LPCWSTR pFileName, UINT32 textCodePage);

include/dxc/Test/CompilationResult.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ class TrivialDxcUnsavedFile : public IDxcUnsavedFile {
101101
}
102102
};
103103

104-
class HlslIntellisenseSupport : public dxc::DxcDllSupport {
104+
class HlslIntellisenseSupport : public dxc::SpecificDllLoader {
105105
public:
106106
HlslIntellisenseSupport() {}
107107
HlslIntellisenseSupport(HlslIntellisenseSupport &&other)
108-
: dxc::DxcDllSupport(std::move(other)) {}
108+
: dxc::SpecificDllLoader(std::move(other)) {}
109109

110110
HRESULT CreateIntellisense(IDxcIntelliSense **pResult) {
111111
return CreateInstance(CLSID_DxcIntelliSense, pResult);

include/dxc/Test/DxcTestUtils.h

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ class FileRunCommandPart {
109109
FileRunCommandPart(const FileRunCommandPart &) = default;
110110
FileRunCommandPart(FileRunCommandPart &&) = default;
111111

112-
FileRunCommandResult Run(dxc::DxcDllSupport &DllSupport,
112+
FileRunCommandResult Run(dxc::SpecificDllLoader &DllSupport,
113113
const FileRunCommandResult *Prior,
114114
PluginToolsPaths *pPluginToolsPaths = nullptr,
115115
LPCWSTR dumpName = nullptr);
116-
FileRunCommandResult RunHashTests(dxc::DxcDllSupport &DllSupport);
116+
FileRunCommandResult RunHashTests(dxc::SpecificDllLoader &DllSupport);
117117

118118
FileRunCommandResult ReadOptsForDxc(hlsl::options::MainArgs &argStrings,
119119
hlsl::options::DxcOpts &Opts,
@@ -127,30 +127,30 @@ class FileRunCommandPart {
127127
private:
128128
FileRunCommandResult RunFileChecker(const FileRunCommandResult *Prior,
129129
LPCWSTR dumpName = nullptr);
130-
FileRunCommandResult RunDxc(dxc::DxcDllSupport &DllSupport,
130+
FileRunCommandResult RunDxc(dxc::SpecificDllLoader &DllSupport,
131131
const FileRunCommandResult *Prior);
132-
FileRunCommandResult RunDxv(dxc::DxcDllSupport &DllSupport,
132+
FileRunCommandResult RunDxv(dxc::SpecificDllLoader &DllSupport,
133133
const FileRunCommandResult *Prior);
134-
FileRunCommandResult RunOpt(dxc::DxcDllSupport &DllSupport,
134+
FileRunCommandResult RunOpt(dxc::SpecificDllLoader &DllSupport,
135135
const FileRunCommandResult *Prior);
136-
FileRunCommandResult RunListParts(dxc::DxcDllSupport &DllSupport,
136+
FileRunCommandResult RunListParts(dxc::SpecificDllLoader &DllSupport,
137137
const FileRunCommandResult *Prior);
138-
FileRunCommandResult RunD3DReflect(dxc::DxcDllSupport &DllSupport,
138+
FileRunCommandResult RunD3DReflect(dxc::SpecificDllLoader &DllSupport,
139139
const FileRunCommandResult *Prior);
140-
FileRunCommandResult RunDxr(dxc::DxcDllSupport &DllSupport,
140+
FileRunCommandResult RunDxr(dxc::SpecificDllLoader &DllSupport,
141141
const FileRunCommandResult *Prior);
142-
FileRunCommandResult RunLink(dxc::DxcDllSupport &DllSupport,
142+
FileRunCommandResult RunLink(dxc::SpecificDllLoader &DllSupport,
143143
const FileRunCommandResult *Prior);
144144
FileRunCommandResult RunTee(const FileRunCommandResult *Prior);
145145
FileRunCommandResult RunXFail(const FileRunCommandResult *Prior);
146-
FileRunCommandResult RunDxilVer(dxc::DxcDllSupport &DllSupport,
146+
FileRunCommandResult RunDxilVer(dxc::SpecificDllLoader &DllSupport,
147147
const FileRunCommandResult *Prior);
148-
FileRunCommandResult RunDxcHashTest(dxc::DxcDllSupport &DllSupport);
148+
FileRunCommandResult RunDxcHashTest(dxc::SpecificDllLoader &DllSupport);
149149
FileRunCommandResult RunFromPath(const std::string &path,
150150
const FileRunCommandResult *Prior);
151151
FileRunCommandResult RunFileCompareText(const FileRunCommandResult *Prior);
152152
#ifdef _WIN32
153-
FileRunCommandResult RunFxc(dxc::DxcDllSupport &DllSupport,
153+
FileRunCommandResult RunFxc(dxc::SpecificDllLoader &DllSupport,
154154
const FileRunCommandResult *Prior);
155155
#endif
156156

@@ -175,12 +175,12 @@ class FileRunTestResult {
175175
PluginToolsPaths *pPluginToolsPaths = nullptr,
176176
LPCWSTR dumpName = nullptr);
177177
static FileRunTestResult
178-
RunFromFileCommands(LPCWSTR fileName, dxc::DxcDllSupport &dllSupport,
178+
RunFromFileCommands(LPCWSTR fileName, dxc::SpecificDllLoader &dllSupport,
179179
PluginToolsPaths *pPluginToolsPaths = nullptr,
180180
LPCWSTR dumpName = nullptr);
181181
};
182182

183-
void AssembleToContainer(dxc::DxcDllSupport &dllSupport, IDxcBlob *pModule,
183+
void AssembleToContainer(dxc::SpecificDllLoader &dllSupport, IDxcBlob *pModule,
184184
IDxcBlob **pContainer);
185185
std::string BlobToUtf8(IDxcBlob *pBlob);
186186
std::wstring BlobToWide(IDxcBlob *pBlob);
@@ -195,35 +195,35 @@ bool CheckMsgs(const LPCSTR pText, size_t TextCount, const LPCSTR *pErrorMsgs,
195195
size_t errorMsgCount, bool bRegex);
196196
bool CheckNotMsgs(const LPCSTR pText, size_t TextCount,
197197
const LPCSTR *pErrorMsgs, size_t errorMsgCount, bool bRegex);
198-
void GetDxilPart(dxc::DxcDllSupport &dllSupport, IDxcBlob *pProgram,
198+
void GetDxilPart(dxc::SpecificDllLoader &dllSupport, IDxcBlob *pProgram,
199199
IDxcBlob **pDxilPart);
200-
std::string DisassembleProgram(dxc::DxcDllSupport &dllSupport,
200+
std::string DisassembleProgram(dxc::SpecificDllLoader &dllSupport,
201201
IDxcBlob *pProgram);
202202
void SplitPassList(LPWSTR pPassesBuffer, std::vector<LPCWSTR> &passes);
203-
void MultiByteStringToBlob(dxc::DxcDllSupport &dllSupport,
203+
void MultiByteStringToBlob(dxc::SpecificDllLoader &dllSupport,
204204
const std::string &val, UINT32 codePoint,
205205
IDxcBlob **ppBlob);
206-
void MultiByteStringToBlob(dxc::DxcDllSupport &dllSupport,
206+
void MultiByteStringToBlob(dxc::SpecificDllLoader &dllSupport,
207207
const std::string &val, UINT32 codePoint,
208208
IDxcBlobEncoding **ppBlob);
209-
void Utf8ToBlob(dxc::DxcDllSupport &dllSupport, const std::string &val,
209+
void Utf8ToBlob(dxc::SpecificDllLoader &dllSupport, const std::string &val,
210210
IDxcBlob **ppBlob);
211-
void Utf8ToBlob(dxc::DxcDllSupport &dllSupport, const std::string &val,
211+
void Utf8ToBlob(dxc::SpecificDllLoader &dllSupport, const std::string &val,
212212
IDxcBlobEncoding **ppBlob);
213-
void Utf8ToBlob(dxc::DxcDllSupport &dllSupport, const char *pVal,
213+
void Utf8ToBlob(dxc::SpecificDllLoader &dllSupport, const char *pVal,
214214
IDxcBlobEncoding **ppBlob);
215-
void WideToBlob(dxc::DxcDllSupport &dllSupport, const std::wstring &val,
215+
void WideToBlob(dxc::SpecificDllLoader &dllSupport, const std::wstring &val,
216216
IDxcBlob **ppBlob);
217-
void WideToBlob(dxc::DxcDllSupport &dllSupport, const std::wstring &val,
217+
void WideToBlob(dxc::SpecificDllLoader &dllSupport, const std::wstring &val,
218218
IDxcBlobEncoding **ppBlob);
219-
void VerifyCompileOK(dxc::DxcDllSupport &dllSupport, LPCSTR pText,
219+
void VerifyCompileOK(dxc::SpecificDllLoader &dllSupport, LPCSTR pText,
220220
LPCWSTR pTargetProfile, LPCWSTR pArgs,
221221
IDxcBlob **ppResult);
222-
void VerifyCompileOK(dxc::DxcDllSupport &dllSupport, LPCSTR pText,
222+
void VerifyCompileOK(dxc::SpecificDllLoader &dllSupport, LPCSTR pText,
223223
LPCWSTR pTargetProfile, std::vector<LPCWSTR> &args,
224224
IDxcBlob **ppResult);
225225

226-
HRESULT GetVersion(dxc::DxcDllSupport &DllSupport, REFCLSID clsid,
226+
HRESULT GetVersion(dxc::SpecificDllLoader &DllSupport, REFCLSID clsid,
227227
unsigned &Major, unsigned &Minor);
228228
bool ParseTargetProfile(llvm::StringRef targetProfile,
229229
llvm::StringRef &outStage, unsigned &outMajor,
@@ -240,7 +240,7 @@ class VersionSupportInfo {
240240

241241
VersionSupportInfo();
242242
// Initialize version info structure. TODO: add device shader model support
243-
void Initialize(dxc::DxcDllSupport &dllSupport);
243+
void Initialize(dxc::SpecificDllLoader &dllSupport);
244244
// Return true if IR sensitive test should be skipped, and log comment
245245
bool SkipIRSensitiveTest();
246246
// Return true if test requiring DXIL of given version should be skipped, and

lib/DxcSupport/HLSLOptions.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,9 +1381,10 @@ int ReadDxcOpts(const OptTable *optionTable, unsigned flagsToInclude,
13811381
return 0;
13821382
}
13831383

1384-
/// Sets up the specified DxcDllSupport instance as per the given options.
1385-
int SetupDxcDllSupport(const DxcOpts &opts, dxc::DxcDllSupport &dxcSupport,
1386-
llvm::raw_ostream &errors) {
1384+
/// Sets up the specified SpecificDllLoader instance as per the given options.
1385+
int SetupSpecificDllLoader(const DxcOpts &opts,
1386+
dxc::SpecificDllLoader &dxcSupport,
1387+
llvm::raw_ostream &errors) {
13871388
if (!opts.ExternalLib.empty()) {
13881389
DXASSERT(!opts.ExternalFn.empty(), "else ReadDxcOpts should have failed");
13891390
HRESULT hrLoad = dxcSupport.InitializeForDll(opts.ExternalLib.data(),

lib/DxcSupport/dxcapi.extval.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@
66

77
namespace dxc {
88

9-
HRESULT DxcDllExtValidationSupport::CreateInstance(REFCLSID clsid, REFIID riid,
10-
IUnknown **pResult) {
9+
HRESULT DxcDllExtValidationLoader::CreateInstance(REFCLSID clsid, REFIID riid,
10+
IUnknown **pResult) {
1111
if (DxilExtValSupport.IsEnabled() && clsid == CLSID_DxcValidator)
1212
return DxilExtValSupport.CreateInstance(clsid, riid, pResult);
1313

1414
return DxCompilerSupport.CreateInstance(clsid, riid, pResult);
1515
}
1616

17-
HRESULT DxcDllExtValidationSupport::CreateInstance2(IMalloc *pMalloc,
18-
REFCLSID clsid, REFIID riid,
19-
IUnknown **pResult) {
17+
HRESULT DxcDllExtValidationLoader::CreateInstance2(IMalloc *pMalloc,
18+
REFCLSID clsid, REFIID riid,
19+
IUnknown **pResult) {
2020
if (DxilExtValSupport.IsEnabled() && clsid == CLSID_DxcValidator)
2121
return DxilExtValSupport.CreateInstance2(pMalloc, clsid, riid, pResult);
2222

2323
return DxCompilerSupport.CreateInstance2(pMalloc, clsid, riid, pResult);
2424
}
2525

26-
HRESULT DxcDllExtValidationSupport::InitializeInternal(LPCSTR fnName) {
26+
HRESULT DxcDllExtValidationLoader::InitializeInternal(LPCSTR fnName) {
2727
// Load dxcompiler.dll
2828
HRESULT Result = DxCompilerSupport.InitializeForDll(kDxCompilerLib, fnName);
2929
// if dxcompiler.dll fails to load, return the failed HRESULT
@@ -48,7 +48,7 @@ HRESULT DxcDllExtValidationSupport::InitializeInternal(LPCSTR fnName) {
4848
return DxilExtValSupport.InitializeForDll(DxilDllPath.c_str(), fnName);
4949
}
5050

51-
bool DxcDllExtValidationSupport::GetCreateInstanceProcs(
51+
bool DxcDllExtValidationLoader::GetCreateInstanceProcs(
5252
DxcCreateInstanceProc *pCreateFn,
5353
DxcCreateInstance2Proc *pCreateFn2) const {
5454
if (pCreateFn == nullptr || pCreateFn2 == nullptr || m_createFn == nullptr)

lib/DxcSupport/dxcapi.use.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ void IFT_Data(HRESULT hr, LPCWSTR data) {
7373
throw ::hlsl::Exception(hr, errMsg);
7474
}
7575

76-
void EnsureEnabled(DxcDllSupport &dxcSupport) {
76+
void EnsureEnabled(SpecificDllLoader &dxcSupport) {
7777
if (!dxcSupport.IsEnabled()) {
7878
IFT(dxcSupport.Initialize());
7979
}
8080
}
8181

82-
void ReadFileIntoBlob(DxcDllSupport &dxcSupport, LPCWSTR pFileName,
82+
void ReadFileIntoBlob(SpecificDllLoader &dxcSupport, LPCWSTR pFileName,
8383
IDxcBlobEncoding **ppBlobEncoding) {
8484
CComPtr<IDxcLibrary> library;
8585
IFT(dxcSupport.CreateInstance(CLSID_DxcLibrary, &library));

projects/dxilconv/unittests/DxilConvTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class DxilConvTest {
6767
END_TEST_METHOD()
6868

6969
private:
70-
dxc::DxcDllSupport m_dllSupport;
70+
dxc::SpecificDllLoader m_dllSupport;
7171
PluginToolsPaths m_TestToolPaths;
7272

7373
void DxilConvTestCheckFile(LPCWSTR path) {

tools/clang/tools/dxa/dxa.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ static cl::opt<bool> DumpPSV("dumppsv",
7979
class DxaContext {
8080

8181
private:
82-
DxcDllSupport &m_dxcSupport;
82+
SpecificDllLoader &m_dxcSupport;
8383
HRESULT FindModule(hlsl::DxilFourCC fourCC, IDxcBlob *pSource,
8484
IDxcLibrary *pLibrary, IDxcBlob **ppTarget);
8585
bool ExtractPart(uint32_t Part, IDxcBlob **ppTargetBlob);
8686
bool ExtractPart(IDxcBlob *pSource, uint32_t Part, IDxcBlob **ppTargetBlob);
8787

8888
public:
89-
DxaContext(DxcDllSupport &dxcSupport) : m_dxcSupport(dxcSupport) {}
89+
DxaContext(SpecificDllLoader &dxcSupport) : m_dxcSupport(dxcSupport) {}
9090

9191
void Assemble();
9292
bool ExtractFile(const char *pName);
@@ -546,7 +546,7 @@ int main(int argc, const char **argv) {
546546
return 2;
547547
}
548548

549-
DxcDllSupport dxcSupport;
549+
SpecificDllLoader dxcSupport;
550550
dxc::EnsureEnabled(dxcSupport);
551551
DxaContext context(dxcSupport);
552552
if (ListParts) {

0 commit comments

Comments
 (0)