summaryrefslogtreecommitdiff
path: root/include/llvm/Target/TargetLoweringObjectFile.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-10 01:39:42 +0000
committerChris Lattner <sabre@nondot.org>2009-08-10 01:39:42 +0000
commitff4bc460c52c1f285d8a56da173641bf92d49e3f (patch)
tree7da0d5977dffaffaa4bb5da91039d0960f839f77 /include/llvm/Target/TargetLoweringObjectFile.h
parente36df3fd31a08a41d9ad04fcba182b616b030c9c (diff)
downloadllvm-ff4bc460c52c1f285d8a56da173641bf92d49e3f.tar.gz
llvm-ff4bc460c52c1f285d8a56da173641bf92d49e3f.tar.bz2
llvm-ff4bc460c52c1f285d8a56da173641bf92d49e3f.tar.xz
Make the big switch: Change MCSectionMachO to represent a section *semantically*
instead of syntactically as a string. This means that it keeps track of the segment, section, flags, etc directly and asmprints them in the right format. This also includes parsing and validation support for llvm-mc and "attribute(section)", so we should now start getting errors about invalid section attributes from the compiler instead of the assembler on darwin. Still todo: 1) Uniquing of darwin mcsections 2) Move all the Darwin stuff out to MCSectionMachO.[cpp|h] 3) there are a few FIXMEs, for example what is the syntax to get the S_GB_ZEROFILL segment type? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78547 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetLoweringObjectFile.h')
-rw-r--r--include/llvm/Target/TargetLoweringObjectFile.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/include/llvm/Target/TargetLoweringObjectFile.h b/include/llvm/Target/TargetLoweringObjectFile.h
index 0b6fd30a31..2ca196340d 100644
--- a/include/llvm/Target/TargetLoweringObjectFile.h
+++ b/include/llvm/Target/TargetLoweringObjectFile.h
@@ -257,9 +257,30 @@ public:
Mangler *) const;
/// getMachOSection - Return the MCSection for the specified mach-o section.
- /// FIXME: Switch this to a semantic view eventually.
- const MCSection *getMachOSection(const char *Name, bool isDirective,
- SectionKind K) const;
+ /// This requires the operands to be valid.
+ const MCSection *getMachOSection(StringRef Segment, StringRef Section,
+ unsigned TypeAndAttributes,
+ SectionKind K) const {
+ return getMachOSection(Segment, Section, TypeAndAttributes, 0, K);
+ }
+ const MCSection *getMachOSection(StringRef Segment, StringRef Section,
+ unsigned TypeAndAttributes,
+ unsigned Reserved2, SectionKind K) const;
+
+ /// getTextCoalSection - Return the "__TEXT,__textcoal_nt" section we put weak
+ /// symbols into.
+ const MCSection *getTextCoalSection() const {
+ return TextCoalSection;
+ }
+
+ /// getLazySymbolPointerSection - Return the section corresponding to
+ /// the .lazy_symbol_pointer directive.
+ const MCSection *getLazySymbolPointerSection() const;
+
+ /// getNonLazySymbolPointerSection - Return the section corresponding to
+ /// the .non_lazy_symbol_pointer directive.
+ const MCSection *getNonLazySymbolPointerSection() const;
+
};