[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 23 11:00:08 PDT 2024


================
@@ -21228,6 +21228,14 @@ Value *RISCVTargetLowering::getIRStackGuard(IRBuilderBase &IRB) const {
   if (Subtarget.isTargetAndroid())
     return useTpOffset(IRB, -0x18);
 
+  Module *M = IRB.GetInsertBlock()->getParent()->getParent();
----------------
topperc wrote:

I think `getParent()->getParent()` can be replaced with `getModule()`

https://github.com/llvm/llvm-project/pull/108942


More information about the llvm-commits mailing list