diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-07-29 17:48:06 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-07-29 17:48:06 +0000 |
commit | 1abcd06856df324eac98d4bf5ba673fb77ae6a11 (patch) | |
tree | e4f96369b02bdba4be3ac49bbdf9fe22d44fe7bb /include | |
parent | c46a5f20c5ab9c497a91d3227d6368e92069cace (diff) | |
download | external_llvm-1abcd06856df324eac98d4bf5ba673fb77ae6a11.zip external_llvm-1abcd06856df324eac98d4bf5ba673fb77ae6a11.tar.gz external_llvm-1abcd06856df324eac98d4bf5ba673fb77ae6a11.tar.bz2 |
Plug the remaining MC leaks by giving MCObjectStreamer/MCAsmStreamer ownership of the TargetAsmBackend and the MCCodeEmitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109767 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/MC/MCStreamer.h | 6 | ||||
-rw-r--r-- | include/llvm/Target/TargetRegistry.h | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/include/llvm/MC/MCStreamer.h b/include/llvm/MC/MCStreamer.h index aca7dd3..1ded9f7 100644 --- a/include/llvm/MC/MCStreamer.h +++ b/include/llvm/MC/MCStreamer.h @@ -331,7 +331,7 @@ namespace llvm { /// InstPrint. /// /// \param CE - If given, a code emitter to use to show the instruction - /// encoding inline with the assembly. + /// encoding inline with the assembly. This method takes ownership of \arg CE. /// /// \param ShowInst - Whether to show the MCInst representation inline with /// the assembly. @@ -343,12 +343,16 @@ namespace llvm { /// createMachOStreamer - Create a machine code streamer which will generate /// Mach-O format object files. + /// + /// Takes ownership of \arg TAB and \arg CE. MCStreamer *createMachOStreamer(MCContext &Ctx, TargetAsmBackend &TAB, raw_ostream &OS, MCCodeEmitter *CE, bool RelaxAll = false); /// createWinCOFFStreamer - Create a machine code streamer which will /// generate Microsoft COFF format object files. + /// + /// Takes ownership of \arg TAB and \arg CE. MCStreamer *createWinCOFFStreamer(MCContext &Ctx, TargetAsmBackend &TAB, MCCodeEmitter &CE, raw_ostream &OS); diff --git a/include/llvm/Target/TargetRegistry.h b/include/llvm/Target/TargetRegistry.h index f022149..2817b0c 100644 --- a/include/llvm/Target/TargetRegistry.h +++ b/include/llvm/Target/TargetRegistry.h @@ -278,9 +278,9 @@ namespace llvm { /// /// \arg TT - The target triple. /// \arg Ctx - The target context. - /// \arg TAB - The target assembler backend object. + /// \arg TAB - The target assembler backend object. Takes ownership. /// \arg _OS - The stream object. - /// \arg _Emitter - The target independent assembler object. + /// \arg _Emitter - The target independent assembler object.Takes ownership. /// \arg RelaxAll - Relax all fixups? MCStreamer *createObjectStreamer(const std::string &TT, MCContext &Ctx, TargetAsmBackend &TAB, |