diff options
author | Sergei Barannikov <barannikov88@gmail.com> | 2024-08-13 04:00:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-13 04:00:19 +0300 |
commit | 75c7bca740935a0cca462e28475dd6b046a6872c (patch) | |
tree | 664d10bf0a09d65c386bfc290b3518020f7df399 /llvm/lib/IR/DataLayout.cpp | |
parent | f8f34c7e4914ce9e90453e902e2e03f129119fb6 (diff) | |
download | llvm-75c7bca740935a0cca462e28475dd6b046a6872c.zip llvm-75c7bca740935a0cca462e28475dd6b046a6872c.tar.gz llvm-75c7bca740935a0cca462e28475dd6b046a6872c.tar.bz2 |
[DataLayout] Remove constructor accepting a pointer to Module (#102841)
The constructor initializes `*this` with `M->getDataLayout()`, which
is effectively the same as calling the copy constructor.
There does not seem to be a case where a copy would be necessary.
Pull Request: https://github.com/llvm/llvm-project/pull/102841
Diffstat (limited to 'llvm/lib/IR/DataLayout.cpp')
-rw-r--r-- | llvm/lib/IR/DataLayout.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/llvm/lib/IR/DataLayout.cpp b/llvm/lib/IR/DataLayout.cpp index 2aa3b67..1efa61e 100644 --- a/llvm/lib/IR/DataLayout.cpp +++ b/llvm/lib/IR/DataLayout.cpp @@ -22,7 +22,6 @@ #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/GetElementPtrTypeIterator.h" #include "llvm/IR/GlobalVariable.h" -#include "llvm/IR/Module.h" #include "llvm/IR/Type.h" #include "llvm/IR/Value.h" #include "llvm/Support/Casting.h" @@ -589,12 +588,6 @@ Error DataLayout::parseSpecifier(StringRef Desc) { return Error::success(); } -DataLayout::DataLayout(const Module *M) { - init(M); -} - -void DataLayout::init(const Module *M) { *this = M->getDataLayout(); } - static SmallVectorImpl<LayoutAlignElem>::const_iterator findAlignmentLowerBound(const SmallVectorImpl<LayoutAlignElem> &Alignments, uint32_t BitWidth) { |