From 6ee94556b7faf861b1aa3b70201fe0dfd7a69ac8 Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 30 Jul 2015 11:08:43 -0400
Subject: [PATCH] P4 to Git Change 1175561 by mbareghe@mbareghe_stg_win30 on
2015/07/30 10:53:59
EPR #419362 - Forum [170348]: problem with printf for OpenCL 2.0 kernel build - fix for regression caused in Sanity debugger tests.
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/llvm32/lib/Target/AMDIL/AMDILKernelManager.cpp#3 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#197 edit
---
rocclr/runtime/device/gpu/gpuprogram.cpp | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/rocclr/runtime/device/gpu/gpuprogram.cpp b/rocclr/runtime/device/gpu/gpuprogram.cpp
index 494132e1f2..0dbe5d3494 100644
--- a/rocclr/runtime/device/gpu/gpuprogram.cpp
+++ b/rocclr/runtime/device/gpu/gpuprogram.cpp
@@ -1273,6 +1273,8 @@ NullProgram::parseFuncMetadata(const std::string& source, size_t posBegin, size_
for (size_t i = 0; i < tmp; ++i) {
char symbol = source[pos++];
if (symbol == '\\') {
+ // Rest of the C escape sequences (e.g. \') are handled correctly
+ // by the MDParser, we are not sure exactly how!
switch (source[pos]) {
case 'n':
pos++;
@@ -1282,6 +1284,22 @@ NullProgram::parseFuncMetadata(const std::string& source, size_t posBegin, size_
pos++;
symbol = '\r';
break;
+ case 'a':
+ pos++;
+ symbol = '\a';
+ break;
+ case 'b':
+ pos++;
+ symbol = '\b';
+ break;
+ case 'f':
+ pos++;
+ symbol = '\f';
+ break;
+ case 'v':
+ pos++;
+ symbol = '\v';
+ break;
default:
break;
}