From b665d79f14286304c34b97dc480591e106bcf6f5 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 16 Oct 2013 14:54:39 +0000 Subject: [PATCH] Add more documentation about the TargetStreamer interface. llvm-svn: 192796 --- llvm/docs/CodeGenerator.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/llvm/docs/CodeGenerator.rst b/llvm/docs/CodeGenerator.rst index 4b9928881151..c87a62867271 100644 --- a/llvm/docs/CodeGenerator.rst +++ b/llvm/docs/CodeGenerator.rst @@ -643,6 +643,11 @@ inherit from it, a target object streamer and a target asm streamer. The target asm streamer just prints it (``emitFnStart -> .fnstrart``), and the object streamer implement the assembler logic for it. +To make llvm use these classes, the target initialization must call +TargetRegistry::RegisterAsmStreamer and TargetRegistry::RegisterMCObjectStreamer +passing callbacks that allocate the corresponding target streamer and pass it +to createAsmStreamer or to the appropriate object streamer constructor. + The ``MCContext`` class -----------------------