class Libraries
Defined at line 91 of file ../../tools/fidl/fidlc/src/compiler.h
Libraries manages a set of compiled libraries along with resources common to
all of them (e.g. the shared typespace). The libraries must be inserted in
order: first the dependencies, with each one only depending on those that
came before it, and lastly the target library.
Public Methods
std::unique_ptr<Compilation> Filter (const VersionSelection * version_selection)
Returns the filtered compilation for the last-inserted library.
TODO(https://fxbug.dev/42146818): Add a method that doesn't take a version selection
and preserves everything, for the full-history IR needed by zither.
bool Insert (std::unique_ptr<Library> library)
Insert |library|. It must only depend on already-inserted libraries.
void Libraries (Reporter * reporter, VirtualSourceFile * generated_source_file)
Defined at line 93 of file ../../tools/fidl/fidlc/src/compiler.h
void Libraries (const Libraries & )
Defined at line 99 of file ../../tools/fidl/fidlc/src/compiler.h
void Libraries (Libraries && )
Defined at line 100 of file ../../tools/fidl/fidlc/src/compiler.h
bool Empty ()
Returns true if no libraries have been inserted.
Defined at line 121 of file ../../tools/fidl/fidlc/src/compiler.h
Library * Lookup (std::string_view library_name)
Lookup a library by its |library_name|, or returns null if none is found.
void Remove (const Library * library)
Removes a library that was inserted before.
TODO(https://fxbug.dev/42172334): This is only needed to filter out the zx library,
and should be deleted once that is no longer necessary.
std::set<const Library *, LibraryComparator> Unused ()
Returns libraries that were inserted but never used, i.e. that do not occur
in the target libary's dependency tree. Must have inserted at least one.
AttributeSchema & AddAttributeSchema (std::string name)
Registers a new attribute schema under the given name, and returns it.
const AttributeSchema & RetrieveAttributeSchema (const Attribute * attribute)
Gets the schema for an attribute. For unrecognized attributes, returns
AttributeSchema::kUserDefined.
void WarnOnAttributeTypo (const Attribute * attribute)
Reports a warning if the given attribute appears to be a typo for an
official attribute.
const Library * root_library ()
Returns the root library, which defines builtin types.
Defined at line 124 of file ../../tools/fidl/fidlc/src/compiler.h
const Library * target_library ()
Returns the target library, i.e. the main one for which the others are
dependencies. Must only be called after all libraries have been inserted.
Defined at line 128 of file ../../tools/fidl/fidlc/src/compiler.h
Reporter * reporter ()
Defined at line 145 of file ../../tools/fidl/fidlc/src/compiler.h
Typespace * typespace ()
Defined at line 146 of file ../../tools/fidl/fidlc/src/compiler.h
VirtualSourceFile * generated_source_file ()
Defined at line 147 of file ../../tools/fidl/fidlc/src/compiler.h