1 //===- Core/AbsoluteAtom.h - An absolute Atom -----------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLD_CORE_ABSOLUTE_ATOM_H
10 #define LLD_CORE_ABSOLUTE_ATOM_H
12 #include "lld/Core/Atom.h"
16 /// An AbsoluteAtom has no content.
17 /// It exists to represent content at fixed addresses in memory.
18 class AbsoluteAtom : public Atom {
21 virtual uint64_t value() const = 0;
23 /// scope - The visibility of this atom to other atoms. C static functions
24 /// have scope scopeTranslationUnit. Regular C functions have scope
25 /// scopeGlobal. Functions compiled with visibility=hidden have scope
26 /// scopeLinkageUnit so they can be see by other atoms being linked but not
28 virtual Scope scope() const = 0;
30 static bool classof(const Atom *a) {
31 return a->definition() == definitionAbsolute;
34 static bool classof(const AbsoluteAtom *) { return true; }
37 AbsoluteAtom() : Atom(definitionAbsolute) {}
42 #endif // LLD_CORE_ABSOLUTE_ATOM_H