P4 to Git Change 1077270 by emankov@em-hsa-amd on 2014/09/16 09:26:09

ECR #333753 - Compiler Lib: Bug fix in string options comparison

	Tests: smoke, precheck-in

	Reviewer: Brian Sumner, Artem Tamazov

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/options.cpp#30 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/options.hpp#15 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpucompiler.cpp#149 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#176 edit


[ROCm/clr commit: 9c02c73c2f]
Αυτή η υποβολή περιλαμβάνεται σε:
foreman
2014-09-16 09:39:53 -04:00
γονέας 6f9b379fd7
υποβολή 2fe29882fa
3 αρχεία άλλαξαν με 8 προσθήκες και 4 διαγραφές
@@ -1489,10 +1489,14 @@ Options::getDumpFileName(const std::string& ext)
}
bool
Options::isCStrEqual(const char *cs1, const char* cs2)
Options::isCStrOptionsEqual(const char *cs1, const char* cs2) const
{
if ((cs1 != NULL) && (cs2 != NULL)) {
return (strcmp(cs1, cs2) == 0);
} else if ((cs1 == NULL || strcmp(cs1,"") == 0) &&
(cs2 == NULL || strcmp(cs2,"") == 0)) {
// consider empty string and NULL ptr (no string) as equal
return true;
}
return false;
}
@@ -1527,7 +1531,7 @@ bool Options::equals(const Options& other, bool ignoreClcOptions) const
else if (OPTION_type(od) == OT_CSTRING) {
OT_CSTRING_t* o = reinterpret_cast<OT_CSTRING_t*>(addr);
OT_CSTRING_t* o2 = reinterpret_cast<OT_CSTRING_t*>(addr2);
if (*o != *o2) return false;
if (!isCStrOptionsEqual(*o,*o2)) return false;
}
else {
return false;