1//===- CIE.h --------------------------------------------------------------===//
2//
3//                     The MCLinker Project
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9#ifndef MCLD_COMMON_INFORMATION_ENTRY_H
10#define MCLD_COMMON_INFORMATION_ENTRY_H
11#ifdef ENABLE_UNITTEST
12#include <gtest.h>
13#endif
14
15#include <llvm/Support/DataTypes.h>
16#include <mcld/LD/RegionFragment.h>
17
18namespace mcld
19{
20
21/** \class CIE
22 *  \brief Common Information Entry.
23 *  The CIE structure refers to LSB Core Spec 4.1, chap.10.6. Exception Frames.
24 */
25class CIE : public RegionFragment
26{
27public:
28  explicit CIE(MemoryRegion& pRegion, uint8_t pFDEEncode);
29  ~CIE();
30
31  // ----- observers ----- //
32  /// getFDEEncoding - get the FDE encoding from Augmentation Data if 'R'
33  /// is present in Augmentaion String
34  uint8_t getFDEEncode() const
35  { return m_FDEEncoding; }
36
37private:
38  uint8_t m_FDEEncoding;
39};
40
41} // namespace of mcld
42
43#endif
44
45