Fix compiling issue exposed by opencl TC build

1.Some files are not built in rocclr so the issues are
not found in rocclr build. But the issues are exposed
in TC build.
2.Clear unused codes in test cmake file.

Change-Id: I1ad4decdf4df5237b93e1ea2547eb39a19f7dc4a
Esse commit está contido em:
Tao Sang
2020-09-04 09:42:14 -04:00
commit de Tao Sang
commit 65075e72f1
4 arquivos alterados com 8 adições e 14 exclusões
+4 -4
Ver Arquivo
@@ -110,9 +110,9 @@ bool ClBinary::loadKernels(NullProgram& program, bool* hasRecompiled) {
bool usedebugil = program.getCompilerOptions()->oVariables->UseDebugIL;
int num = elfIn()->getSymbolNum();
for (int index = 0; index < num; index++) {
for (int ndx = 0; ndx < num; ndx++) {
amd::Elf::SymbolInfo symInfo;
if (!elfIn()->getSymbolInfo(index, &symInfo)) {
if (!elfIn()->getSymbolInfo(ndx, &symInfo)) {
LogError("LoadKernelFromElf: getSymbolInfo() fails");
return false;
}
@@ -457,9 +457,9 @@ bool ClBinary::loadGlobalData(Program& program) {
const char _global[] = "_global";
int num = elfIn()->getSymbolNum();
for (int index = 0; index < num; index++) {
for (int ndx = 0; ndx < num; ndx++) {
amd::Elf::SymbolInfo symInfo;
if (!elfIn()->getSymbolInfo(index, &symInfo)) {
if (!elfIn()->getSymbolInfo(ndx, &symInfo)) {
LogError("LoadGlobalDataFromElf: getSymbolInfo() fails");
return false;
}