diff options
author | Devang Patel <dpatel@apple.com> | 2009-06-04 23:32:02 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-06-04 23:32:02 +0000 |
commit | 24095dad88dd9d48aa16afa6416417073af251b5 (patch) | |
tree | cb6cf528ddeeaf180c936a02072738515ef104e5 /lib/CodeGen/CGCall.cpp | |
parent | 340a4e500f7a3952e7e72265c977711e504c69c7 (diff) |
Set function attribute llvm::Attribute::NoRedZone appropriately.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72902 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index ea0b887c64..954ac53068 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -21,6 +21,7 @@ #include "clang/AST/DeclCXX.h" #include "clang/AST/DeclObjC.h" #include "clang/AST/RecordLayout.h" +#include "clang/Frontend/CompileOptions.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Attributes.h" #include "llvm/Support/CallSite.h" @@ -1751,6 +1752,9 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, FuncAttrs |= llvm::Attribute::ReadOnly; } + if (CompileOpts.DisableRedZone) + FuncAttrs |= llvm::Attribute::NoRedZone; + QualType RetTy = FI.getReturnType(); unsigned Index = 1; const ABIArgInfo &RetAI = FI.getReturnInfo(); |