aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorManman Ren <mren@apple.com>2013-02-04 23:45:08 +0000
committerManman Ren <mren@apple.com>2013-02-04 23:45:08 +0000
commit86b1d868ba5a66e816771473878b83b519b1608f (patch)
treed04305d78184808dd80202b69fad4a909c8905cc /llvm/lib/CodeGen/MachineFunction.cpp
parent56aecccee09407a3a1f35fe214b900ca08f0ebe5 (diff)
downloadllvm-86b1d868ba5a66e816771473878b83b519b1608f.zip
llvm-86b1d868ba5a66e816771473878b83b519b1608f.tar.gz
llvm-86b1d868ba5a66e816771473878b83b519b1608f.tar.bz2
[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
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index 3d7d20d..4a9a62a 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;
}