/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/tools/lld/include/lld/Core/AbsoluteAtom.h
Line | Count | Source (jump to first uncovered line) |
1 | | //===- Core/AbsoluteAtom.h - An absolute Atom -----------------------------===// |
2 | | // |
3 | | // The LLVM Linker |
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 LLD_CORE_ABSOLUTE_ATOM_H |
11 | | #define LLD_CORE_ABSOLUTE_ATOM_H |
12 | | |
13 | | #include "lld/Core/Atom.h" |
14 | | |
15 | | namespace lld { |
16 | | |
17 | | /// An AbsoluteAtom has no content. |
18 | | /// It exists to represent content at fixed addresses in memory. |
19 | | class AbsoluteAtom : public Atom { |
20 | | public: |
21 | | |
22 | | virtual uint64_t value() const = 0; |
23 | | |
24 | | /// scope - The visibility of this atom to other atoms. C static functions |
25 | | /// have scope scopeTranslationUnit. Regular C functions have scope |
26 | | /// scopeGlobal. Functions compiled with visibility=hidden have scope |
27 | | /// scopeLinkageUnit so they can be see by other atoms being linked but not |
28 | | /// by the OS loader. |
29 | | virtual Scope scope() const = 0; |
30 | | |
31 | 59 | static bool classof(const Atom *a) { |
32 | 59 | return a->definition() == definitionAbsolute; |
33 | 59 | } |
34 | | |
35 | 0 | static bool classof(const AbsoluteAtom *) { return true; } |
36 | | |
37 | | protected: |
38 | 0 | AbsoluteAtom() : Atom(definitionAbsolute) {} |
39 | | }; |
40 | | |
41 | | } // namespace lld |
42 | | |
43 | | #endif // LLD_CORE_ABSOLUTE_ATOM_H |