[llvm] [IR] Add getDataLayout() helpers to Function and GlobalValue (PR #96919)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 27 08:56:48 PDT 2024
================
@@ -2110,7 +2110,7 @@ bool HexagonTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
case Intrinsic::hexagon_L2_loadrb_pbr:
case Intrinsic::hexagon_L2_loadrub_pbr: {
Info.opc = ISD::INTRINSIC_W_CHAIN;
- auto &DL = I.getCalledFunction()->getParent()->getDataLayout();
+ auto &DL = I.getCalledFunction()->getDataLayout();
----------------
dtcxzyw wrote:
```suggestion
auto &DL = I.getDataLayout();
```
https://github.com/llvm/llvm-project/pull/96919
More information about the llvm-commits
mailing list