[PATCH] D97247: [WebAssembly] Fix incorrect grouping and sorting of exceptions
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 23 14:48:34 PST 2021
aheejin marked an inline comment as done.
aheejin added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp:343
}
EHInfo.SrcToUnwindDest = std::move(NewMap);
+ NewMap.clear();
----------------
dschuff wrote:
> does `move`ing from `NewMap` mean it can't be touched anymore at all? Or is calling some kind of initialization function on it OK?
> I guess if we think it's not ok, we could always use `swap` instead.
Yes, functions without preconditions can be used on the object after it was moved from. `clear()` doesn't assume anything so it's fine.
>From https://en.cppreference.com/w/cpp/utility/move:
> Unless otherwise specified, all standard library objects that have been moved from are placed in a valid but unspecified state. That is, only the functions without preconditions, such as the assignment operator, can be safely used on the object after it was moved from:
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97247/new/
https://reviews.llvm.org/D97247
More information about the llvm-commits
mailing list