MLIR  20.0.0git
Classes | Public Member Functions | List of all members
mlir::lsp::CompilationDatabase Class Reference

This class contains a collection of compilation information for files provided to the language server, such as the available include directories. More...

#include "mlir/Tools/lsp-server-support/CompilationDatabase.h"

Classes

struct  FileInfo
 Compilation information for a specific file within the database. More...
 

Public Member Functions

 CompilationDatabase (ArrayRef< std::string > databases)
 Construct a compilation database from the provided files containing YAML descriptions of the database. More...
 
const FileInfogetFileInfo (StringRef filename) const
 Get the compilation information for the provided file. More...
 

Detailed Description

This class contains a collection of compilation information for files provided to the language server, such as the available include directories.

This database acts as an aggregate in-memory form of compilation databases used by the current language client. The textual form of a compilation database is a YAML file containing documents of the following form:

— !FileInfo: filepath: <string> - Absolute file path of the file. includes: <string> - Semi-colon delimited list of include directories.

Definition at line 37 of file CompilationDatabase.h.

Constructor & Destructor Documentation

◆ CompilationDatabase()

CompilationDatabase::CompilationDatabase ( ArrayRef< std::string >  databases)

Construct a compilation database from the provided files containing YAML descriptions of the database.

Definition at line 66 of file CompilationDatabase.cpp.

Member Function Documentation

◆ getFileInfo()

const CompilationDatabase::FileInfo & CompilationDatabase::getFileInfo ( StringRef  filename) const

Get the compilation information for the provided file.

Definition at line 72 of file CompilationDatabase.cpp.


The documentation for this class was generated from the following files: