>
> if(options) {
> char *p;
> p = strstr(const_cast<char *>(options), "-cl-opt-disable");
> if (p)
> optLevel = 0;
> +
> + char *str = (char *)malloc(sizeof(char) * (strlen(options) + 1));
> + memcpy(str, options, strlen(options) + 1);
> + std::string optionStr(str);
> + while (end != std::string::npos) {
> + end = optionStr.find(' ', start);
> + std::string str = optionStr.substr(start, end - start);
> + start = end + 1;
> + if(str.size() == 0)
> + continue;
> +
> + if(str.find("-dump-opt-asm=") != std::string::npos) {
> + dumpASMFileName = str.substr(str.find("=") + 1);
> + continue; // Don't push this str back; ignore it.
> + }
> + }
I think it is not a good way to define two variables with the same name "str"
but of different type here, right? Seems compiler can handle it well.
Other parts just LGTM.
Thanks!
Ruiling
_______________________________________________
Beignet mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet