[PATCH] D103100: [AIX] Enable stackprotect feature
Jinsong Ji via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 27 07:17:00 PDT 2021
jsji added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:16424
+Value *PPCTargetLowering::getSDagStackGuard(const Module &M) const {
+ if (Subtarget.isAIXABI())
+ return M.getGlobalVariable(AIXSSPCanaryWordName);
----------------
shchenz wrote:
> Is it better to add an assertion here to indicate that the return value will never be nullptr?
We can, but I don't think it is necessary.
We call `M.getOrInsertGlobal` in `insertSSPDeclarations` above, so there should not be nullptr.
Also none of the other targets like x86/arm adding the assert too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103100/new/
https://reviews.llvm.org/D103100
More information about the llvm-commits
mailing list