Skip to content

Commit f91cf98

Browse files
committed
[RISCV][ISelLowering] Use getModule() instead of getParent()->getParent()
This is a simple clean-up motivated by review of changes adding TLS support for the stack canary. Using getModule() is a shorter and clearer expression of the desired operation. Signed-off-by: Keith Packard <[email protected]>
1 parent 848cb21 commit f91cf98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21304,7 +21304,7 @@ bool RISCVTargetLowering::preferScalarizeSplat(SDNode *N) const {
2130421304
}
2130521305

2130621306
static Value *useTpOffset(IRBuilderBase &IRB, unsigned Offset) {
21307-
Module *M = IRB.GetInsertBlock()->getParent()->getParent();
21307+
Module *M = IRB.GetInsertBlock()->getModule();
2130821308
Function *ThreadPointerFunc =
2130921309
Intrinsic::getDeclaration(M, Intrinsic::thread_pointer);
2131021310
return IRB.CreateConstGEP1_32(IRB.getInt8Ty(),

0 commit comments

Comments
 (0)