Home | History | Annotate | Download | only in Core

Lines Matching defs:File

1 //===- Core/File.h - A Container of Atoms ---------------------------------===//
5 // This file is distributed under the University of Illinois Open Source
30 /// Every Atom is owned by some File. A common scenario is for a single
31 /// object file (.o) to be parsed by some reader and produce a single
32 /// File object that represents the content of that object file.
34 /// To iterate through the Atoms in a File there are four methods that
36 /// in a File object use:
37 /// for (const DefinedAtoms *atom : file->defined()) {
40 /// The Atom objects in a File are owned by the File object. The Atom objects
41 /// are destroyed when the File object is destroyed.
42 class File {
44 virtual ~File();
48 kindErrorObject, ///< a error object file (.o)
49 kindNormalizedObject, ///< a normalized file (.o)
50 kindMachObject, ///< a MachO object file (.o)
51 kindCEntryObject, ///< a file for CEntries
52 kindHeaderObject, ///< a file for file headers
53 kindEntryObject, ///< a file for the entry
54 kindUndefinedSymsObject, ///< a file for undefined symbols
55 kindStubHelperObject, ///< a file for stub helpers
56 kindResolverMergedObject, ///< the resolver merged file.
57 kindSectCreateObject, ///< a sect create object file (.o)
62 /// \brief Returns file kind. Need for dyn_cast<> on File objects.
67 /// This returns the path to the file which was used to create this object
68 /// (e.g. "/tmp/foo.o"). If the file is a member of an archive file, the
69 /// returned string includes the archive file name.
78 /// Returns the path of the archive file name if this file is instantiated
79 /// from an archive file. Otherwise returns the empty string.
83 /// Returns the path name of this file. It doesn't include archive file name.
86 /// Returns the command line order of the file.
95 /// Sets the command line order of the file.
98 /// Returns the ordinal for the next atom to be defined in this file.
103 /// For allocating any objects owned by this File.
178 /// all DefinedAtoms in this File.
182 /// all UndefinedAtomw in this File.
186 /// all SharedLibraryAtoms in this File.
190 /// all AbsoluteAtoms in this File.
193 /// Drop all of the atoms owned by this file. This will result in all of
196 /// of a different file. We need to destruct all atoms before any files.
199 /// \brief If a file is parsed using a different method than doParse(),
207 // Usually each file owns a std::unique_ptr<MemoryBuffer>.
208 // However, there's one special case. If a file is an archive file,
209 // the archive file and its children all shares the same memory buffer.
217 /// \brief only subclasses of File can be instantiated
218 File(StringRef p, Kind kind)
223 /// memory buffer passed to this file's constructor.
244 /// An ErrorFile represents a file that doesn't exist.
245 /// If you try to parse a file which doesn't exist, an instance of this
248 /// can do unit testing a driver using non-existing file paths.
249 class ErrorFile : public File {
252 : File(path, kindErrorObject), _ec(ec) {}