| 34 | namespace amd { |
| 35 | |
| 36 | static void remove_g_option(std::string& option) { |
| 37 | // Remove " -g " option from application. |
| 38 | // People can still add -g in AMD_OCL_BUILD_OPTIONS_APPEND, if it is so desired. |
| 39 | std::string g_str("-g"); |
| 40 | std::size_t g_pos = 0; |
| 41 | while ((g_pos = option.find(g_str, g_pos)) != std::string::npos) { |
| 42 | if ((g_pos == 0 || option[g_pos - 1] == ' ') && |
| 43 | (g_pos + 2 == option.size() || option[g_pos + 2] == ' ')) { |
| 44 | option.erase(g_pos, g_str.size()); |
| 45 | } else { |
| 46 | g_pos += g_str.size(); |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | return; |
| 51 | } |
| 52 | |
| 53 | Program::~Program() { |
| 54 | unload(); |
no test coverage detected