Move CompilerInterface to ExecutionEnvironment

Change-Id: I14afdd8fc41ecd4ac8c8fcbeecda2539bc847288
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban
2018-08-01 09:06:46 +02:00
committed by sys_ocldev
parent 931b462ee1
commit d2759a0629
18 changed files with 114 additions and 190 deletions

View File

@@ -54,32 +54,6 @@ class BinaryCacheFixture
BinaryCache *cache;
};
class TestedCompilerInterface : public CompilerInterface {
public:
static TestedCompilerInterface *getInstance() {
if (pInstance == nullptr) {
auto instance = new TestedCompilerInterface();
if (!instance->initialize()) {
delete instance;
instance = nullptr;
}
pInstance = instance;
}
return pInstance;
}
static void shutdown() {
if (pInstance) {
delete pInstance;
pInstance = nullptr;
}
}
static TestedCompilerInterface *pInstance;
};
TestedCompilerInterface *TestedCompilerInterface::pInstance = nullptr;
class BinaryCacheMock : public BinaryCache {
public:
BinaryCacheMock() {
@@ -103,12 +77,11 @@ class CompilerInterfaceCachedFixture : public DeviceFixture {
public:
void SetUp() {
DeviceFixture::SetUp();
pCompilerInterface = TestedCompilerInterface::getInstance();
pCompilerInterface = pDevice->getExecutionEnvironment()->getCompilerInterface();
ASSERT_NE(pCompilerInterface, nullptr);
}
void TearDown() {
TestedCompilerInterface::shutdown();
DeviceFixture::TearDown();
}