add comments, privatize interface
[oota-llvm.git] / include / llvm / MC / MCSection.h
1 //===- MCSection.h - Machine Code Sections ----------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares the MCSection class.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_MC_MCSECTION_H
15 #define LLVM_MC_MCSECTION_H
16
17 #include <string>
18
19 namespace llvm {
20
21   /// MCSection - Instances of this class represent a uniqued identifier for a
22   /// section in the current translation unit.  The MCContext class uniques and
23   /// creates these.
24   class MCSection {
25     std::string Name;
26   private:
27     friend class MCContext;
28     MCSection(const char *_Name) : Name(_Name) {}
29     
30     MCSection(const MCSection&);      // DO NOT IMPLEMENT
31     void operator=(const MCSection&); // DO NOT IMPLEMENT
32   public:
33
34     const std::string &getName() const { return Name; }
35   };
36
37 } // end namespace llvm
38
39 #endif