aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/MC
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-07-29 17:48:06 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-07-29 17:48:06 +0000
commit6b9e0db32aa329ee53c48dc04edef340e26b93a3 (patch)
treee4f96369b02bdba4be3ac49bbdf9fe22d44fe7bb /include/llvm/MC
parenta1470c1187018157cab91c780931221f06d02271 (diff)
downloadexternal_llvm-6b9e0db32aa329ee53c48dc04edef340e26b93a3.zip
external_llvm-6b9e0db32aa329ee53c48dc04edef340e26b93a3.tar.gz
external_llvm-6b9e0db32aa329ee53c48dc04edef340e26b93a3.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/llvm/MC')
-rw-r--r--include/llvm/MC/MCStreamer.h6
1 files changed, 5 insertions, 1 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);