[LLVMdev] AsmPrinter directory

Jim Grosbach grosbach at apple.com
Tue Jun 21 09:19:16 PDT 2011


Hi Ankur,

The old 'AsmPrinter' directory has been renamed to "InstPrinter". The *AsmPrinter.cpp file drives the overall process, using the InstPrinter to handle the details. These days, normally that's done by converting (in *AsmPrinter.cpp) the MachineInstr's to MCInst's, then passing those MCInst's to an output MCStreamer. If the streamer is an assembly printer, the output will go via the InstPrinter for each instruction (and directive). If it's an object file, it'll use the *MCCodeEmitter.cpp interface instead. Or any other streamer the target has elected to implement for that matter, but those two are the main situations.

-Jim

On Jun 20, 2011, at 6:41 PM, ankur deshwal wrote:

> Hi,
> 
> While trying to debug a linking problem related to AsmPrinter, I found
> following lines in {srcdir}/configure file.
> 
> 
>  if test -f ${srcdir}/lib/Target/${target_to_build}/*AsmPrinter.cpp ; then
>    LLVM_ENUM_ASM_PRINTERS="LLVM_ASM_PRINTER($target_to_build)
> $LLVM_ENUM_ASM_PRINTERS";
> 
> It looks like the AsmPrinters are enumerated only if *AsmPrinter.cpp
> file is present in {srcdir}/lib/Target/${target_to_build}
> 
> Does this means that making a separate directory for AsmPrinter is no
> more supported. I saw other architectures have also moved the files
> from ${target_to_build}AsmPrinter/ to ${target_to_build}.
> 
> Thanks,
> Ankur
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list