Update for DiagnosticInfoStackSize changes

llvm-svn: 273178
This commit is contained in:
Matt Arsenault 2016-06-20 18:13:09 +00:00
parent ff98241f37
commit 4deb4ed21e
2 changed files with 11 additions and 1 deletions

View File

@ -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;
}

View File

@ -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;
}