From 86b1d868ba5a66e816771473878b83b519b1608f Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Mon, 4 Feb 2013 23:45:08 +0000 Subject: [Stack Alignment] emit warning instead of a hard error Per discussion in rdar://13127907, we should emit a hard error only if people write code where the requested alignment is larger than achievable and assumes the low bits are zeros. A warning should be good enough when we are not sure if the source code assumes the low bits are zeros. rdar://13127907 llvm-svn: 174336 --- llvm/lib/CodeGen/MachineFunction.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen/MachineFunction.cpp') diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 3d7d20d4160..4a9a62a7048 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -479,11 +479,11 @@ static inline unsigned clampStackAlignment(bool ShouldClamp, unsigned PrefAlign, if (!ShouldClamp || PrefAlign <= StackAlign) return PrefAlign; if (Alloca && MinAlign > StackAlign) - Alloca->getParent()->getContext().emitError(Alloca, - "Requested Minimal Alignment exceeds the Stack Alignment!"); + Alloca->getParent()->getContext().emitWarning(Alloca, + "Requested alignment exceeds the stack alignment!"); else assert(MinAlign <= StackAlign && - "Requested Minimal Alignment exceeds the Stack Alignment!"); + "Requested alignment exceeds the stack alignment!"); return StackAlign; } -- cgit v1.2.3