From 5b3ecedc9b5655052989ec6cec6fed13ef72ae9b Mon Sep 17 00:00:00 2001
From: foreman
Date: Fri, 17 Jul 2015 19:50:05 -0400
Subject: [PATCH] P4 to Git Change 1171714 by marsenau@marsenau_home on
2015/07/17 19:29:59
ECR #304775 - First batch of build fixes for clang.
Fixes hard source errors and a handful of simple warnings, but leaves most other warnings for later. Other errors not fixed here are from adding compile flags that are not understood.
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/clc/src/e2lCommon.h#11 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/opt_level.hpp#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/HSAIL/BRIGAsmPrinter.cpp#117 edit
... //depot/stg/opencl/drivers/opencl/opencldefs#162 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#289 edit
---
rocclr/compiler/lib/backends/common/opt_level.hpp | 5 ++++-
rocclr/runtime/device/gpu/gpukernel.cpp | 6 +++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/rocclr/compiler/lib/backends/common/opt_level.hpp b/rocclr/compiler/lib/backends/common/opt_level.hpp
index 5037bb35fe..e7a8b761a7 100644
--- a/rocclr/compiler/lib/backends/common/opt_level.hpp
+++ b/rocclr/compiler/lib/backends/common/opt_level.hpp
@@ -10,7 +10,10 @@
#include "llvm/Analysis/Passes.h"
namespace llvm {
class Module;
- class FunctionPassManager;
+
+ namespace legacy {
+ class FunctionPassManager;
+ }
}; // llvm namespace
namespace amdcl
{
diff --git a/rocclr/runtime/device/gpu/gpukernel.cpp b/rocclr/runtime/device/gpu/gpukernel.cpp
index a5f3e8af4f..c68008e3ad 100644
--- a/rocclr/runtime/device/gpu/gpukernel.cpp
+++ b/rocclr/runtime/device/gpu/gpukernel.cpp
@@ -3993,7 +3993,7 @@ HSAILKernel::loadArguments(
mem = *reinterpret_cast(paramaddr);
if (mem == NULL) {
LogError( "The kernel image argument isn't an image object!");
- return false;
+ return nullptr;
}
image = static_cast(dev().getGpuMemory(mem));
}
@@ -4063,8 +4063,8 @@ HSAILKernel::loadArguments(
}
else {
if (!gpu.createVirtualQueue(queue->size())) {
- LogError( "Virtual queue creaiton failed!");
- return false;
+ LogError("Virtual queue creation failed!");
+ return nullptr;
}
vmQueue = gpu.vQueue()->vmAddress();
}