create sections with MCSection::Create instead of Context->getOrCreateSection.
[oota-llvm.git] / include / llvm / MC / MCContext.h
index 24dbc40479bce6f36f2147bc2c0be5f462fbead7..a8187cce6f5f49efea75ab2886b713381e1dcb48 100644 (file)
@@ -42,12 +42,14 @@ namespace llvm {
     /// objects.
     BumpPtrAllocator Allocator;
 
+    friend class MCSection;
   public:
     MCContext();
     ~MCContext();
 
-    /// GetSection - Get or create a new section with the given @param Name.
-    MCSection *GetSection(const StringRef &Name);
+    /// GetSection - Look up a section with the given @param Name, returning
+    /// null if it doesn't exist.
+    MCSection *GetSection(const StringRef &Name) const;
     
     /// CreateSymbol - Create a new symbol with the specified @param Name.
     ///