diff options
author | Nick Desaulniers <ndesaulniers@google.com> | 2020-11-17 17:17:44 -0800 |
---|---|---|
committer | Nick Desaulniers <ndesaulniers@google.com> | 2020-11-17 17:27:14 -0800 |
commit | f4c6080ab820219c5bf78b0c2143e7fa194da296 (patch) | |
tree | f396fe0699171b36e03a76554abb301b558f46b9 /llvm/lib/CodeGen/StackProtector.cpp | |
parent | dd6087cac087046b5cd29a21e7fff2732fb35997 (diff) | |
download | llvm-f4c6080ab820219c5bf78b0c2143e7fa194da296.zip llvm-f4c6080ab820219c5bf78b0c2143e7fa194da296.tar.gz llvm-f4c6080ab820219c5bf78b0c2143e7fa194da296.tar.bz2 |
Revert "[IR] add fn attr for no_stack_protector; prevent inlining on mismatch"
This reverts commit b7926ce6d7a83cdf70c68d82bc3389c04009b841.
Going with a simpler approach.
Diffstat (limited to 'llvm/lib/CodeGen/StackProtector.cpp')
-rw-r--r-- | llvm/lib/CodeGen/StackProtector.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/StackProtector.cpp b/llvm/lib/CodeGen/StackProtector.cpp index 01536e2..8074793 100644 --- a/llvm/lib/CodeGen/StackProtector.cpp +++ b/llvm/lib/CodeGen/StackProtector.cpp @@ -270,15 +270,13 @@ static const CallInst *findStackProtectorIntrinsic(Function &F) { /// regardless of size, functions with any buffer regardless of type and size, /// functions with aggregates that contain any buffer regardless of type and /// size, and functions that contain stack-based variables that have had their -/// address taken. The heuristic will be disregarded for functions explicitly -/// marked nossp. +/// address taken. bool StackProtector::RequiresStackProtector() { bool Strong = false; bool NeedsProtector = false; HasPrologue = findStackProtectorIntrinsic(*F); - if (F->hasFnAttribute(Attribute::SafeStack) || - F->hasFnAttribute(Attribute::NoStackProtect)) + if (F->hasFnAttribute(Attribute::SafeStack)) return false; // We are constructing the OptimizationRemarkEmitter on the fly rather than |