diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index e6e5c39..6ebf9e1 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -731,7 +731,7 @@ simplifyAndDCEInstruction(Instruction *I, bool llvm::SimplifyInstructionsInBlock(BasicBlock *BB, const TargetLibraryInfo *TLI) { bool MadeChange = false; - const DataLayout &DL = BB->getModule()->getDataLayout(); + const DataLayout &DL = BB->getDataLayout(); #ifndef NDEBUG // In debug builds, ensure that the terminator of the block is never replaced @@ -1601,7 +1601,7 @@ static bool PhiHasDebugValue(DILocalVariable *DIVar, /// value when doing the comparison. E.g. an i1 value will be identified as /// covering an n-bit fragment, if the store size of i1 is at least n bits. static bool valueCoversEntireFragment(Type *ValTy, DbgVariableIntrinsic *DII) { - const DataLayout &DL = DII->getModule()->getDataLayout(); + const DataLayout &DL = DII->getDataLayout(); TypeSize ValueSize = DL.getTypeAllocSizeInBits(ValTy); if (std::optional<uint64_t> FragmentSize = DII->getExpression()->getActiveBits(DII->getVariable())) @@ -3371,7 +3371,7 @@ void llvm::copyMetadataForLoad(LoadInst &Dest, const LoadInst &Source) { Source.getAllMetadata(MD); MDBuilder MDB(Dest.getContext()); Type *NewType = Dest.getType(); - const DataLayout &DL = Source.getModule()->getDataLayout(); + const DataLayout &DL = Source.getDataLayout(); for (const auto &MDPair : MD) { unsigned ID = MDPair.first; MDNode *N = MDPair.second; |