Skip to content

Commit 57a7208

Browse files
authored
Fix a use-after-move bug in DWARFVerifier constructor (#83621)
Resolve a use-after-move bug for the parameter "DumpOpts" in the DWARFVerifier constructor.
1 parent 17efdad commit 57a7208

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,8 @@ DWARFVerifier::DWARFVerifier(raw_ostream &S, DWARFContext &D,
10831083
DIDumpOptions DumpOpts)
10841084
: OS(S), DCtx(D), DumpOpts(std::move(DumpOpts)), IsObjectFile(false),
10851085
IsMachOObject(false) {
1086-
ErrorCategory.ShowDetail(DumpOpts.Verbose || !DumpOpts.ShowAggregateErrors);
1086+
ErrorCategory.ShowDetail(this->DumpOpts.Verbose ||
1087+
!this->DumpOpts.ShowAggregateErrors);
10871088
if (const auto *F = DCtx.getDWARFObj().getFile()) {
10881089
IsObjectFile = F->isRelocatableObject();
10891090
IsMachOObject = F->isMachO();

0 commit comments

Comments
 (0)