diff options
author | Eli Friedman <efriedma@codeaurora.org> | 2018-10-26 01:31:57 +0000 |
---|---|---|
committer | Eli Friedman <efriedma@codeaurora.org> | 2018-10-26 01:31:57 +0000 |
commit | 540be6d0bb1fa8f90196dc678fb3b6b7e7f94416 (patch) | |
tree | 9fb40fb37a46e1899cea93d2804701b03866230b /clang/lib/CodeGen/TargetInfo.cpp | |
parent | 32fd196cbf4d510aace7e42cf492b4dc2f3cd7e2 (diff) | |
download | bcm5719-llvm-540be6d0bb1fa8f90196dc678fb3b6b7e7f94416.tar.gz bcm5719-llvm-540be6d0bb1fa8f90196dc678fb3b6b7e7f94416.zip |
[AArch64] Support Windows stack probe command-line arguments.
Adds support for -mno-stack-arg-probe and -mstack-probe-size.
(Not really happy copy-pasting code, but that's what we do for all the
other Windows targets.)
Differential Revision: https://reviews.llvm.org/D53617
llvm-svn: 345354
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 5288ea7e001..1d6514eac3d 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -5001,6 +5001,9 @@ public: WindowsAArch64TargetCodeGenInfo(CodeGenTypes &CGT, AArch64ABIInfo::ABIKind K) : AArch64TargetCodeGenInfo(CGT, K) {} + void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, + CodeGen::CodeGenModule &CGM) const override; + void getDependentLibraryOption(llvm::StringRef Lib, llvm::SmallString<24> &Opt) const override { Opt = "/DEFAULTLIB:" + qualifyWindowsLibrary(Lib); @@ -5011,6 +5014,14 @@ public: Opt = "/FAILIFMISMATCH:\"" + Name.str() + "=" + Value.str() + "\""; } }; + +void WindowsAArch64TargetCodeGenInfo::setTargetAttributes( + const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const { + AArch64TargetCodeGenInfo::setTargetAttributes(D, GV, CGM); + if (GV->isDeclaration()) + return; + addStackProbeTargetAttributes(D, GV, CGM); +} } ABIArgInfo AArch64ABIInfo::classifyArgumentType(QualType Ty) const { |