MCAsmLayout.h revision a0e36d55c495b3325805c659ac365b5faea84e34
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
13namespace llvm {
14class 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.
23class MCAsmLayout {
24private:
25  MCAssembler &Assembler;
26
27public:
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
37