diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-16 16:51:38 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-16 16:51:38 +0000 |
| commit | c69102774f9739c81ae1285ed9ae62405071c63c (patch) | |
| tree | 458dd25677a43aef6390ecadb4423817f00e08b0 /include/llvm/MC/MCAsmLayout.h | |
| parent | ea5b2dd11c0526581803e7eb58224a2eabf191e6 (diff) | |
Notes
Diffstat (limited to 'include/llvm/MC/MCAsmLayout.h')
| -rw-r--r-- | include/llvm/MC/MCAsmLayout.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/include/llvm/MC/MCAsmLayout.h b/include/llvm/MC/MCAsmLayout.h new file mode 100644 index 000000000000..27bdbe9cbf59 --- /dev/null +++ b/include/llvm/MC/MCAsmLayout.h @@ -0,0 +1,36 @@ +//===- MCAsmLayout.h - Assembly Layout Object -------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_MC_MCASMLAYOUT_H +#define LLVM_MC_MCASMLAYOUT_H + +namespace llvm { +class MCAssembler; + +/// Encapsulates the layout of an assembly file at a particular point in time. +/// +/// Assembly may requiring compute multiple layouts for a particular assembly +/// file as part of the relaxation process. This class encapsulates the layout +/// at a single point in time in such a way that it is always possible to +/// efficiently compute the exact addresses of any symbol in the assembly file, +/// even during the relaxation process. +class MCAsmLayout { +private: + MCAssembler &Assembler; + +public: + MCAsmLayout(MCAssembler &_Assembler) : Assembler(_Assembler) {} + + /// Get the assembler object this is a layout for. + MCAssembler &getAssembler() const { return Assembler; } +}; + +} // end namespace llvm + +#endif |
