llvm.org GIT mirror llvm / c9d3152
add some comments: MCContext owns the MCSections, but it bump pointer allocates them, so it doesn't have to explicitly free them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78870 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 10 years ago
3 changed file(s) with 5 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
1919 class MCSymbol;
2020 class StringRef;
2121
22 /// MCContext - Context object for machine code objects.
22 /// MCContext - Context object for machine code objects. This class owns all
23 /// of the sections that it creates.
24 ///
2325 class MCContext {
2426 MCContext(const MCContext&); // DO NOT IMPLEMENT
2527 MCContext &operator=(const MCContext&); // DO NOT IMPLEMENT
4749 /// GetSection - Look up a section with the given @param Name, returning
4850 /// null if it doesn't exist.
4951 MCSection *GetSection(const StringRef &Name) const;
50
5152
5253 void SetSection(const StringRef &Name, MCSection *S) {
5354 MCSection *&Entry = Sections[Name];
1717 }
1818
1919 MCContext::~MCContext() {
20 // NOTE: The sections are all allocated out of a bump pointer allocator,
21 // we don't need to free them here.
2022 }
2123
2224 MCSection *MCContext::GetSection(const StringRef &Name) const {