switch MCSectionCOFF from a syntactic to semantic representation,

patch by Peter Housel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103267 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-05-07 17:17:41 +00:00
parent 5fa680d397
commit eb40a0fd98
9 changed files with 277 additions and 120 deletions

View File

@ -48,32 +48,6 @@ namespace llvm {
return false;
}
};
class MCSectionCOFF : public MCSection {
// The memory for this string is stored in the same MCContext as *this.
StringRef Name;
/// IsDirective - This is true if the section name is a directive, not
/// something that should be printed with ".section".
///
/// FIXME: This is a hack. Switch to a semantic view of the section instead
/// of a syntactic one.
bool IsDirective;
MCSectionCOFF(StringRef name, bool isDirective, SectionKind K)
: MCSection(K), Name(name), IsDirective(isDirective) {
}
public:
static MCSectionCOFF *Create(StringRef Name, bool IsDirective,
SectionKind K, MCContext &Ctx);
StringRef getName() const { return Name; }
bool isDirective() const { return IsDirective; }
virtual void PrintSwitchToSection(const MCAsmInfo &MAI,
raw_ostream &OS) const;
};
} // end namespace llvm