[llvm] 57a7208 - Fix a use-after-move bug in DWARFVerifier constructor (#83621)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 4 08:56:32 PST 2024
Author: ykhatav
Date: 2024-03-04T11:56:28-05:00
New Revision: 57a720872128ea21e8ed22cdd9ae4c62154e6fb1
URL: https://github.com/llvm/llvm-project/commit/57a720872128ea21e8ed22cdd9ae4c62154e6fb1
DIFF: https://github.com/llvm/llvm-project/commit/57a720872128ea21e8ed22cdd9ae4c62154e6fb1.diff
LOG: Fix a use-after-move bug in DWARFVerifier constructor (#83621)
Resolve a use-after-move bug for the parameter "DumpOpts" in the
DWARFVerifier constructor.
Added:
Modified:
llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
Removed:
################################################################################
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
index 520debe513d9f1..4ef6c80ed0289d 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
@@ -1083,7 +1083,8 @@ DWARFVerifier::DWARFVerifier(raw_ostream &S, DWARFContext &D,
DIDumpOptions DumpOpts)
: OS(S), DCtx(D), DumpOpts(std::move(DumpOpts)), IsObjectFile(false),
IsMachOObject(false) {
- ErrorCategory.ShowDetail(DumpOpts.Verbose || !DumpOpts.ShowAggregateErrors);
+ ErrorCategory.ShowDetail(this->DumpOpts.Verbose ||
+ !this->DumpOpts.ShowAggregateErrors);
if (const auto *F = DCtx.getDWARFObj().getFile()) {
IsObjectFile = F->isRelocatableObject();
IsMachOObject = F->isMachO();
More information about the llvm-commits
mailing list