From 06df7725fc2334c3662664f89993b07190505b89 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 14 Feb 2012 21:28:13 +0000 Subject: Add code to the target lowering object file module to handle module flags. The MachO back-end needs to emit the garbage collection flags specified in the module flags. This is a WIP, so the front-end hasn't been modified to emit these flags just yet. Documentation and front-end switching to occur soon. llvm-svn: 150507 --- llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 241f20097ed..80d90d668de 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -857,6 +857,10 @@ bool AsmPrinter::doFinalization(Module &M) { EmitVisibility(Name, V, false); } + // Emit module flags. + if (NamedMDNode *ModFlags = M.getModuleFlagsMetadata()) + getObjFileLowering().emitModuleFlags(OutStreamer, ModFlags, Mang, TM); + // Finalize debug and EH information. if (DE) { { -- cgit v1.2.3