3c2addf58c52c5924a4b10998f1f5a097ce34719
[oota-llvm.git] / include / llvm / MC / MCContext.h
1 //===- MCContext.h - Machine Code Context -----------------------*- 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 #ifndef LLVM_MC_MCCONTEXT_H
11 #define LLVM_MC_MCCONTEXT_H
12
13 namespace llvm {
14   class MCAtom;
15   class MCImm;
16   class MCSection;
17   class MCSymbol;
18
19   /// MCContext - Context object for machine code objects.
20   class MCContext {
21     MCContext(const MCContext&); // DO NOT IMPLEMENT
22     MCContext &operator=(const MCContext&); // DO NOT IMPLEMENT
23
24   public:
25     MCContext();
26     ~MCContext();
27
28     MCSection *GetSection(const char *Name);
29     MCAtom *CreateAtom(MCSection *Section);
30     MCSymbol *CreateSymbol(MCAtom *Atom,
31                            const char *Name,
32                            bool IsTemporary);
33     MCSymbol *LookupSymbol(const char *Name) const;
34
35     void SetSymbolValue(MCSymbol *Sym, const MCImm &Value);
36     const MCImm &GetSymbolValue(MCSymbol *Sym) const;
37   };
38
39 } // end namespace llvm
40
41 #endif