diff --git a/projects/clr/rocclr/compiler/lib/backends/common/frontend.cpp b/projects/clr/rocclr/compiler/lib/backends/common/frontend.cpp index 1ef0352303..7ab17b1f55 100644 --- a/projects/clr/rocclr/compiler/lib/backends/common/frontend.cpp +++ b/projects/clr/rocclr/compiler/lib/backends/common/frontend.cpp @@ -276,7 +276,7 @@ amdcl::OCLFrontend::compileCommand(const std::string& singleSrc) amd::Os::unlink(logFile.c_str()); if (isCpuTarget(Elf()->target) && Options()->oVariables->EnableDebug) { - Options()->sourceFileName_ = clFile; + Options()->sourceFileName_.assign(clFile); } else { amd::Os::unlink(clFile.c_str()); } diff --git a/projects/clr/rocclr/compiler/lib/utils/options.cpp b/projects/clr/rocclr/compiler/lib/utils/options.cpp index 5ab7c7c64a..2dd39f62be 100644 --- a/projects/clr/rocclr/compiler/lib/utils/options.cpp +++ b/projects/clr/rocclr/compiler/lib/utils/options.cpp @@ -1270,6 +1270,8 @@ Options::Options() : WorkGroupSize[2] = -1; UseDefaultWGS = true; NumAvailGPRs = -1; + + sourceFileName_.reserve(1024); } Options::~Options()