From 133d3d09286ae8ab84f3840c87f98b581f4ac234 Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 11 Mar 2015 12:22:24 -0400
Subject: [PATCH] P4 to Git Change 1129634 by jsjodin@jsjodin_linux_avx_hsa2 on
2015/03/11 12:04:50
ECR #304775 - Fix failure in TC. Allocation and deallocation cannot be done by different DLLs.
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/frontend.cpp#32 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/options.cpp#31 edit
[ROCm/clr commit: 99d43c3313057b3f0c91bbc381402958353380fe]
---
projects/clr/rocclr/compiler/lib/backends/common/frontend.cpp | 2 +-
projects/clr/rocclr/compiler/lib/utils/options.cpp | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
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()