Use function attributes to indicate if we don't want to realign the stack.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187617 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index b4c710c..11ee388 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -1084,6 +1084,9 @@
FuncAttrs.addAttribute("no-frame-pointer-elim-non-leaf",
llvm::toStringRef(NoFramePointerElimNonLeaf));
+
+ if (!CodeGenOpts.StackRealignment)
+ FuncAttrs.addAttribute("no-realign-stack");
}
QualType RetTy = FI.getReturnType();