summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2016-06-20 18:13:09 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2016-06-20 18:13:09 +0000
commit4deb4ed21eda7d5e4fc3371a014249a36d7787b2 (patch)
tree403fcdcaa747ba7214524e57434cc3c9e4d2c45f
parentff98241f3794fef3ea5b156b1e8b4a431043ae26 (diff)
downloadbcm5719-llvm-4deb4ed21eda7d5e4fc3371a014249a36d7787b2.tar.gz
bcm5719-llvm-4deb4ed21eda7d5e4fc3371a014249a36d7787b2.zip
Update for DiagnosticInfoStackSize changes
llvm-svn: 273178
-rw-r--r--clang/lib/CodeGen/CodeGenAction.cpp3
-rw-r--r--clang/test/Misc/backend-resource-limit-diagnostics.cl9
2 files changed, 11 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp
index 848acb4fe07..88618405165 100644
--- a/clang/lib/CodeGen/CodeGenAction.cpp
+++ b/clang/lib/CodeGen/CodeGenAction.cpp
@@ -415,9 +415,10 @@ BackendConsumer::StackSizeDiagHandler(const llvm::DiagnosticInfoStackSize &D) {
return false;
if (const Decl *ND = Gen->GetDeclForMangledName(D.getFunction().getName())) {
+ // FIXME: Shouldn't need to truncate to uint32_t
Diags.Report(ND->getASTContext().getFullLoc(ND->getLocation()),
diag::warn_fe_frame_larger_than)
- << D.getStackSize() << Decl::castToDeclContext(ND);
+ << static_cast<uint32_t>(D.getStackSize()) << Decl::castToDeclContext(ND);
return true;
}
diff --git a/clang/test/Misc/backend-resource-limit-diagnostics.cl b/clang/test/Misc/backend-resource-limit-diagnostics.cl
new file mode 100644
index 00000000000..6e7619babe8
--- /dev/null
+++ b/clang/test/Misc/backend-resource-limit-diagnostics.cl
@@ -0,0 +1,9 @@
+// REQUIRES: amdgpu-registered-target
+// RUN: not %clang_cc1 -emit-codegen-only -triple=amdgcn-- %s 2>&1 | FileCheck %s
+
+// CHECK: error: local memory limit exceeded (480000) in use_huge_lds
+kernel void use_huge_lds()
+{
+ volatile local int huge[120000];
+ huge[0] = 2;
+}
OpenPOWER on IntegriCloud