summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-02-14 21:28:13 +0000
committerBill Wendling <isanbard@gmail.com>2012-02-14 21:28:13 +0000
commit06df7725fc2334c3662664f89993b07190505b89 (patch)
treecf7435a6dc9f470fcadc79acbcd728cb1efd1bfe /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parent8c8578c0b83305fe992daaaf9bd64f88c6147aed (diff)
downloadbcm5719-llvm-06df7725fc2334c3662664f89993b07190505b89.tar.gz
bcm5719-llvm-06df7725fc2334c3662664f89993b07190505b89.zip
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
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp4
1 files changed, 4 insertions, 0 deletions
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) {
{
OpenPOWER on IntegriCloud