MCPcopy Create free account
hub / github.com/ROCm/clr / remove_g_option

Function remove_g_option

rocclr/platform/program.cpp:36–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34namespace amd {
35
36static 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
53Program::~Program() {
54 unload();

Callers 1

adjustOptionsOnIgnoreEnvFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected