MLIR
16.0.0git
|
URI in "file" scheme for a file. More...
#include "Tools/lsp-server-support/Protocol.h"
Public Member Functions | |
URIForFile ()=default | |
StringRef | file () const |
Returns the absolute path to the file. More... | |
StringRef | uri () const |
Returns the original uri of the file. More... | |
operator bool () const | |
Static Public Member Functions | |
static llvm::Expected< URIForFile > | fromURI (StringRef uri) |
Try to build a URIForFile from the given URI string. More... | |
static llvm::Expected< URIForFile > | fromFile (StringRef absoluteFilepath) |
Try to build a URIForFile from the given absolute file path. More... | |
Friends | |
bool | operator== (const URIForFile &lhs, const URIForFile &rhs) |
bool | operator!= (const URIForFile &lhs, const URIForFile &rhs) |
bool | operator< (const URIForFile &lhs, const URIForFile &rhs) |
URI in "file" scheme for a file.
Definition at line 99 of file Protocol.h.
|
default |
Referenced by fromURI().
|
inline |
Returns the absolute path to the file.
Definition at line 110 of file Protocol.h.
Referenced by mlir::lsp::TableGenServer::addDocument(), mlir::lsp::PDLLServer::addDocument(), mlir::lsp::MLIRServer::addOrUpdateDocument(), mlir::lsp::SourceMgrInclude::buildHover(), mlir::lsp::MLIRServer::findDocumentSymbols(), mlir::lsp::PDLLServer::findDocumentSymbols(), mlir::lsp::MLIRServer::findHover(), mlir::lsp::TableGenServer::findHover(), mlir::lsp::PDLLServer::findHover(), mlir::lsp::MLIRServer::findReferencesOf(), mlir::lsp::TableGenServer::findReferencesOf(), mlir::lsp::PDLLServer::findReferencesOf(), mlir::lsp::MLIRServer::getCodeActions(), mlir::lsp::MLIRServer::getCodeCompletion(), mlir::lsp::PDLLServer::getCodeCompletion(), mlir::lsp::TableGenServer::getDocumentLinks(), mlir::lsp::PDLLServer::getDocumentLinks(), mlir::lsp::PDLLServer::getInlayHints(), mlir::lsp::MLIRServer::getLocationsOf(), mlir::lsp::TableGenServer::getLocationsOf(), mlir::lsp::PDLLServer::getLocationsOf(), getLspDiagnoticFromDiag(), mlir::lsp::PDLLServer::getSignatureHelp(), mlir::lsp::MLIRServer::removeDocument(), mlir::lsp::TableGenServer::removeDocument(), mlir::lsp::PDLLServer::removeDocument(), mlir::lsp::TableGenServer::updateDocument(), and mlir::lsp::PDLLServer::updateDocument().
|
static |
Try to build a URIForFile from the given absolute file path.
Definition at line 222 of file Protocol.cpp.
References fromURI(), uri(), and uriFromAbsolutePath().
Referenced by mlir::lsp::gatherIncludeFiles(), getLocationFromLoc(), getURIFromLoc(), and llvm::yaml::MappingTraits< YamlFileInfo >::mapping().
|
static |
Try to build a URIForFile from the given URI string.
Definition at line 215 of file Protocol.cpp.
References parseFilePathFromURI(), and URIForFile().
Referenced by fromFile(), and mlir::lsp::fromJSON().
|
inlineexplicit |
Definition at line 115 of file Protocol.h.
|
inline |
Returns the original uri of the file.
Definition at line 113 of file Protocol.h.
Referenced by fromFile(), mlir::lsp::operator<<(), and mlir::lsp::toJSON().
|
friend |
Definition at line 120 of file Protocol.h.
|
friend |
Definition at line 123 of file Protocol.h.
|
friend |
Definition at line 117 of file Protocol.h.