aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorJinsong Ji <jji@us.ibm.com>2021-06-10 02:39:57 +0000
committerJinsong Ji <jji@us.ibm.com>2021-06-10 02:40:02 +0000
commit4a89ed373cdaf2033a8c164d27c4dfe28b3680bd (patch)
tree15c3a7dc0ca8d5594936074de0c86a45f91c0d5b /llvm/lib/CodeGen
parente87c095af3e3b964a7f400a1767ae1e302cfb0c4 (diff)
downloadllvm-4a89ed373cdaf2033a8c164d27c4dfe28b3680bd.zip
llvm-4a89ed373cdaf2033a8c164d27c4dfe28b3680bd.tar.gz
llvm-4a89ed373cdaf2033a8c164d27c4dfe28b3680bd.tar.bz2
[AIX] Add traceback ssp canary bit support
We will need to set the ssp canary bit in traceback table to communicate with unwinder about the canary. Reviewed By: #powerpc, shchenz Differential Revision: https://reviews.llvm.org/D103202
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 00a8fca..c7fa1d6 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -2188,6 +2188,17 @@ bool TargetLoweringObjectFileXCOFF::ShouldEmitEHBlock(
return true;
}
+bool TargetLoweringObjectFileXCOFF::ShouldSetSSPCanaryBitInTB(
+ const MachineFunction *MF) {
+ const Function &F = MF->getFunction();
+ if (!F.hasStackProtectorFnAttr())
+ return false;
+ // FIXME: check presence of canary word
+ // There are cases that the stack protectors are not really inserted even if
+ // the attributes are on.
+ return true;
+}
+
MCSymbol *
TargetLoweringObjectFileXCOFF::getEHInfoTableSymbol(const MachineFunction *MF) {
return MF->getMMI().getContext().getOrCreateSymbol(