[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:49 PDT 2024


================
@@ -1575,7 +1575,7 @@ static void AddAlignmentAssumptions(CallBase &CB, InlineFunctionInfo &IFI) {
     return;
 
   AssumptionCache *AC = &IFI.GetAssumptionCache(*CB.getCaller());
-  auto &DL = CB.getCaller()->getParent()->getDataLayout();
+  auto &DL = CB.getCaller()->getDataLayout();
----------------
dtcxzyw wrote:

```suggestion
  auto &DL = CB.getDataLayout();
```

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


More information about the llvm-commits mailing list