1 //===- Core/AbsoluteAtom.h - An absolute Atom -----------------------------===//
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLD_CORE_ABSOLUTE_ATOM_H
11 #define LLD_CORE_ABSOLUTE_ATOM_H
13 #include "lld/Core/Atom.h"
17 /// An AbsoluteAtom has no content.
18 /// It exists to represent content at fixed addresses in memory.
19 class AbsoluteAtom : public Atom {
22 virtual uint64_t value() const = 0;
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
29 virtual Scope scope() const = 0;
31 static bool classof(const Atom *a) {
32 return a->definition() == definitionAbsolute;
35 static bool classof(const AbsoluteAtom *) { return true; }
38 AbsoluteAtom() : Atom(definitionAbsolute) {}
43 #endif // LLD_CORE_ABSOLUTE_ATOM_H