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
This commit is contained in:
Tao Sang
2020-09-04 09:42:14 -04:00
committed by Tao Sang
parent 5ecce5c287
commit 65075e72f1
4 changed files with 8 additions and 14 deletions
+4 -4
View File
@@ -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;
}