forked from OSchip/llvm-project
Correct unique_ptr passing in MCObjectDisassembler::setFallbackRegion
Rather than passing by lvalue reference, pass by value to ensure that the caller provides an rvalue (and use move assignment, rather than release+reset, to assign to the member variable) llvm-svn: 216916
This commit is contained in:
parent
1b0713ce09
commit
14f7301392
|
@ -66,8 +66,8 @@ public:
|
|||
/// \brief Set the region on which to fallback if disassembly was requested
|
||||
/// somewhere not accessible in the object file.
|
||||
/// This is used for dynamic disassembly (see RawMemoryObject).
|
||||
void setFallbackRegion(std::unique_ptr<MemoryObject> &Region) {
|
||||
FallbackRegion.reset(Region.release());
|
||||
void setFallbackRegion(std::unique_ptr<MemoryObject> Region) {
|
||||
FallbackRegion = std::move(Region);
|
||||
}
|
||||
|
||||
/// \brief Set the symbolizer to use to get information on external functions.
|
||||
|
|
Loading…
Reference in New Issue