summaryrefslogtreecommitdiff
path: root/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
commitb464d3ff72790260e8c2068afe856fd7299a6834 (patch)
tree20b2297bfeef0c8dfcfc9d5ec383bca0c2a71ad4 /lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parent03698deb25215bf3b4aa2e3ff731ea38923a928c (diff)
downloadllvm-b464d3ff72790260e8c2068afe856fd7299a6834.tar.gz
llvm-b464d3ff72790260e8c2068afe856fd7299a6834.tar.bz2
llvm-b464d3ff72790260e8c2068afe856fd7299a6834.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150507 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 241f20097e..80d90d668d 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/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) {
{