MC: Allow modifiers in MCSymbolRefExpr, and eliminate X86MCTargetExpr.
[oota-llvm.git] / include / llvm / MC / MCAsmLayout.h
1 //===- MCAsmLayout.h - Assembly Layout Object -------------------*- 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_MCASMLAYOUT_H
11 #define LLVM_MC_MCASMLAYOUT_H
12
13 namespace llvm {
14 class MCAssembler;
15
16 /// Encapsulates the layout of an assembly file at a particular point in time.
17 ///
18 /// Assembly may requiring compute multiple layouts for a particular assembly
19 /// file as part of the relaxation process. This class encapsulates the layout
20 /// at a single point in time in such a way that it is always possible to
21 /// efficiently compute the exact addresses of any symbol in the assembly file,
22 /// even during the relaxation process.
23 class MCAsmLayout {
24 private:
25   MCAssembler &Assembler;
26
27 public:
28   MCAsmLayout(MCAssembler &_Assembler) : Assembler(_Assembler) {}
29
30   /// Get the assembler object this is a layout for.
31   MCAssembler &getAssembler() const { return Assembler; }
32 };
33
34 } // end namespace llvm
35
36 #endif