diff options
author | Sergei Barannikov <barannikov88@gmail.com> | 2024-08-13 20:10:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-13 20:10:35 +0300 |
commit | b1aa0b0b88a0bca2553f8c6d6c52ec3b7205064b (patch) | |
tree | b990fab356abb2c73168435f93d04ea870833c1a /llvm/lib/IR/Module.cpp | |
parent | f0ef1d3bae02cd7623e87e759db19432717f51bf (diff) | |
download | llvm-b1aa0b0b88a0bca2553f8c6d6c52ec3b7205064b.zip llvm-b1aa0b0b88a0bca2553f8c6d6c52ec3b7205064b.tar.gz llvm-b1aa0b0b88a0bca2553f8c6d6c52ec3b7205064b.tar.bz2 |
[DataLayout] Remove `clear` and `reset` methods (NFC) (#102993)
`clear` was never necessary as it is always called on a fresh instance
of the class or just before freeing an instance's memory. `reset` is
effectively the same as the constructor.
Pull Reuquest: https://github.com/llvm/llvm-project/pull/102993
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
-rw-r--r-- | llvm/lib/IR/Module.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp index 80b5408..4738ec7 100644 --- a/llvm/lib/IR/Module.cpp +++ b/llvm/lib/IR/Module.cpp @@ -388,9 +388,7 @@ void Module::setModuleFlag(ModFlagBehavior Behavior, StringRef Key, setModuleFlag(Behavior, Key, ConstantInt::get(Int32Ty, Val)); } -void Module::setDataLayout(StringRef Desc) { - DL.reset(Desc); -} +void Module::setDataLayout(StringRef Desc) { DL = DataLayout(Desc); } void Module::setDataLayout(const DataLayout &Other) { DL = Other; } |