aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Target
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 /include/llvm/Target
parent03698deb25215bf3b4aa2e3ff731ea38923a928c (diff)
downloadexternal_llvm-b464d3ff72790260e8c2068afe856fd7299a6834.zip
external_llvm-b464d3ff72790260e8c2068afe856fd7299a6834.tar.gz
external_llvm-b464d3ff72790260e8c2068afe856fd7299a6834.tar.bz2
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 'include/llvm/Target')
-rw-r--r--include/llvm/Target/TargetLoweringObjectFile.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/llvm/Target/TargetLoweringObjectFile.h b/include/llvm/Target/TargetLoweringObjectFile.h
index 04fe220..d1151a1 100644
--- a/include/llvm/Target/TargetLoweringObjectFile.h
+++ b/include/llvm/Target/TargetLoweringObjectFile.h
@@ -29,6 +29,7 @@ namespace llvm {
class MCSectionMachO;
class MCSymbol;
class MCStreamer;
+ class NamedMDNode;
class GlobalValue;
class TargetMachine;
@@ -53,7 +54,12 @@ public:
virtual void emitPersonalityValue(MCStreamer &Streamer,
const TargetMachine &TM,
const MCSymbol *Sym) const;
-
+
+ /// emitModuleFlags - Emit the module flags that the platform cares about.
+ virtual void emitModuleFlags(MCStreamer &, NamedMDNode *, Mangler *,
+ const TargetMachine &) const {
+ }
+
/// shouldEmitUsedDirectiveFor - This hook allows targets to selectively
/// decide not to emit the UsedDirective for some symbols in llvm.used.
/// FIXME: REMOVE this (rdar://7071300)
@@ -86,9 +92,7 @@ public:
const TargetMachine &TM) const {
return SectionForGlobal(GV, getKindForGlobal(GV, TM), Mang, TM);
}
-
-
-
+
/// getExplicitSectionGlobal - Targets should implement this method to assign
/// a section to globals with an explicit section specfied. The
/// implementation of this method can assume that GV->hasSection() is true.