diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-04-15 05:15:19 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-04-15 05:15:19 +0000 |
commit | bb97e1b52ef5315fedf0b92101bcf95e2fae8ff3 (patch) | |
tree | 9dd856a76f25307a4a37404ce0db143a7bace098 /llvm/lib/MC/MCObjectDisassembler.cpp | |
parent | 9f008867c063919762189487e78bcb7ace2b256d (diff) | |
download | bcm5719-llvm-bb97e1b52ef5315fedf0b92101bcf95e2fae8ff3.tar.gz bcm5719-llvm-bb97e1b52ef5315fedf0b92101bcf95e2fae8ff3.zip |
Use unique_ptr to own MCFunctions within MCModule.
MCModule's ctor had to be moved out of line so the definition of
MCFunction was available. (ctor requires the dtor of members (in case
the ctor throws) which required access to the dtor of MCFunction)
llvm-svn: 206244
Diffstat (limited to 'llvm/lib/MC/MCObjectDisassembler.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectDisassembler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCObjectDisassembler.cpp b/llvm/lib/MC/MCObjectDisassembler.cpp index c4ce32515df..1487563e715 100644 --- a/llvm/lib/MC/MCObjectDisassembler.cpp +++ b/llvm/lib/MC/MCObjectDisassembler.cpp @@ -480,7 +480,7 @@ MCObjectDisassembler::createFunction(MCModule *Module, uint64_t BeginAddr, continue; // FIXME: MCModule should provide a findFunctionByAddr() if ((*FI)->getEntryBlock()->getInsts()->getBeginAddr() == BeginAddr) - return *FI; + return FI->get(); } // Finally, just create a new one. |