r273178 - Update for DiagnosticInfoStackSize changes
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 20 11:13:09 PDT 2016
Author: arsenm
Date: Mon Jun 20 13:13:09 2016
New Revision: 273178
URL: http://llvm.org/viewvc/llvm-project?rev=273178&view=rev
Log:
Update for DiagnosticInfoStackSize changes
Added:
cfe/trunk/test/Misc/backend-resource-limit-diagnostics.cl
Modified:
cfe/trunk/lib/CodeGen/CodeGenAction.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenAction.cpp?rev=273178&r1=273177&r2=273178&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenAction.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenAction.cpp Mon Jun 20 13:13:09 2016
@@ -415,9 +415,10 @@ BackendConsumer::StackSizeDiagHandler(co
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;
}
Added: cfe/trunk/test/Misc/backend-resource-limit-diagnostics.cl
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/backend-resource-limit-diagnostics.cl?rev=273178&view=auto
==============================================================================
--- cfe/trunk/test/Misc/backend-resource-limit-diagnostics.cl (added)
+++ cfe/trunk/test/Misc/backend-resource-limit-diagnostics.cl Mon Jun 20 13:13:09 2016
@@ -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;
+}
More information about the cfe-commits
mailing list