diff options
| -rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 15 | ||||
| -rw-r--r-- | clang/test/CodeGenCXX/windows-on-arm-stack-probe-size.cpp | 13 |
2 files changed, 13 insertions, 15 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 44111b2a850..d4ceb0d3da1 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -4889,9 +4889,6 @@ public: }; class WindowsARMTargetCodeGenInfo : public ARMTargetCodeGenInfo { - void addStackProbeSizeTargetAttribute(const Decl *D, llvm::GlobalValue *GV, - CodeGen::CodeGenModule &CGM) const; - public: WindowsARMTargetCodeGenInfo(CodeGenTypes &CGT, ARMABIInfo::ABIKind K) : ARMTargetCodeGenInfo(CGT, K) {} @@ -4900,18 +4897,6 @@ public: CodeGen::CodeGenModule &CGM) const override; }; -void WindowsARMTargetCodeGenInfo::addStackProbeSizeTargetAttribute( - const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const { - if (!isa<FunctionDecl>(D)) - return; - if (CGM.getCodeGenOpts().StackProbeSize == 4096) - return; - - llvm::Function *F = cast<llvm::Function>(GV); - F->addFnAttr("stack-probe-size", - llvm::utostr(CGM.getCodeGenOpts().StackProbeSize)); -} - void WindowsARMTargetCodeGenInfo::setTargetAttributes( const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const { ARMTargetCodeGenInfo::setTargetAttributes(D, GV, CGM); diff --git a/clang/test/CodeGenCXX/windows-on-arm-stack-probe-size.cpp b/clang/test/CodeGenCXX/windows-on-arm-stack-probe-size.cpp new file mode 100644 index 00000000000..235d8a0c465 --- /dev/null +++ b/clang/test/CodeGenCXX/windows-on-arm-stack-probe-size.cpp @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -triple thumbv7--windows-msvc -S -emit-llvm -o - -x c++ %s | FileCheck %s +// RUN: %clang_cc1 -triple thumbv7--windows-itanium -fno-use-cxa-atexit -S -emit-llvm -o - -x c++ %s | FileCheck %s + +class C { +public: + ~C(); +}; + +static C sc; +void f(const C &ci) { sc = ci; } + +// CHECK: atexit + |

