diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-10-09 17:23:41 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-10-09 17:23:41 +0000 |
commit | 3353c592de08c4a7b7b282714b8044d7cfc4c6ad (patch) | |
tree | 9a267531577e125099e551c6bb10866a6a9bff7c /include | |
parent | e0409098aee1270164a7e453e450264f8e62cbfd (diff) | |
download | external_llvm-3353c592de08c4a7b7b282714b8044d7cfc4c6ad.zip external_llvm-3353c592de08c4a7b7b282714b8044d7cfc4c6ad.tar.gz external_llvm-3353c592de08c4a7b7b282714b8044d7cfc4c6ad.tar.bz2 |
Flip the ownership of MCStreamer and MCTargetStreamer.
MCStreamer now owns the target streamer. This prevents leaking the target
streamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192303 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/MC/MCStreamer.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/MC/MCStreamer.h b/include/llvm/MC/MCStreamer.h index 10fc69e..d24f3fd 100644 --- a/include/llvm/MC/MCStreamer.h +++ b/include/llvm/MC/MCStreamer.h @@ -66,11 +66,11 @@ typedef std::pair<const MCSection *, const MCExpr *> MCSectionSubPair; /// be treated differently. Callers should always talk to a FooTargetStreamer. class MCTargetStreamer { protected: - OwningPtr<MCStreamer> Streamer; + MCStreamer *Streamer; public: virtual ~MCTargetStreamer(); - void setStreamer(MCStreamer *S) { Streamer.reset(S); } + void setStreamer(MCStreamer *S) { Streamer = S; } }; // FIXME: declared here because it is used from @@ -100,7 +100,7 @@ public: /// class MCStreamer { MCContext &Context; - MCTargetStreamer *TargetStreamer; + OwningPtr<MCTargetStreamer> TargetStreamer; MCStreamer(const MCStreamer &) LLVM_DELETED_FUNCTION; MCStreamer &operator=(const MCStreamer &) LLVM_DELETED_FUNCTION; |