CIRCT 22.0.0git
|
#include <VerilogIndex.h>
Public Member Functions | |
VerilogIndex (const slang::BufferID &slangBufferID, const slang::SourceManager &sourceManager) | |
void | initialize (slang::ast::Compilation &compilation) |
Initialize the index with the given compilation unit. | |
void | insertSymbol (const slang::ast::Symbol *symbol, slang::SourceRange from, bool isDefinition=false) |
Register a reference to a symbol symbol from from . | |
void | insertSymbolDefinition (const slang::ast::Symbol *symbol) |
const slang::SourceManager & | getSlangSourceManager () const |
const slang::BufferID & | getBufferId () const |
MapT & | getIntervalMap () |
const ReferenceMap & | getReferences () const |
A mapping from a symbol to their references. | |
Private Member Functions | |
void | parseSourceLocation () |
Parse source location emitted by ExportVerilog. | |
void | parseSourceLocation (llvm::StringRef toParse) |
Private Attributes | |
mlir::MLIRContext | mlirContext |
MapT::Allocator | allocator |
An allocator for the interval map. | |
MapT | intervalMap |
An interval map containing a corresponding definition mapped to a source interval. | |
ReferenceMap | references |
References of symbols. | |
const slang::BufferID & | bufferId |
const slang::SourceManager & | sourceManager |
Definition at line 38 of file VerilogIndex.h.
|
inline |
Definition at line 40 of file VerilogIndex.h.
|
inline |
Definition at line 57 of file VerilogIndex.h.
References bufferId.
Referenced by initialize(), and parseSourceLocation().
|
inline |
Definition at line 60 of file VerilogIndex.h.
References intervalMap.
|
inline |
A mapping from a symbol to their references.
Definition at line 63 of file VerilogIndex.h.
References references.
|
inline |
Definition at line 54 of file VerilogIndex.h.
References sourceManager.
Referenced by insertSymbol(), and parseSourceLocation().
void VerilogIndex::initialize | ( | slang::ast::Compilation & | compilation | ) |
Initialize the index with the given compilation unit.
Definition at line 199 of file VerilogIndex.cpp.
References getBufferId(), and parseSourceLocation().
void VerilogIndex::insertSymbol | ( | const slang::ast::Symbol * | symbol, |
slang::SourceRange | from, | ||
bool | isDefinition = false |
||
) |
Register a reference to a symbol symbol
from from
.
Definition at line 308 of file VerilogIndex.cpp.
References assert(), getSlangSourceManager(), intervalMap, and references.
Referenced by insertSymbolDefinition().
void VerilogIndex::insertSymbolDefinition | ( | const slang::ast::Symbol * | symbol | ) |
Definition at line 337 of file VerilogIndex.cpp.
References insertSymbol().
|
private |
Parse source location emitted by ExportVerilog.
Definition at line 283 of file VerilogIndex.cpp.
References getBufferId(), getSlangSourceManager(), circt::lsp::Logger::info(), and parseSourceLocation().
Referenced by initialize(), and parseSourceLocation().
|
private |
|
private |
An allocator for the interval map.
Definition at line 74 of file VerilogIndex.h.
|
private |
Definition at line 84 of file VerilogIndex.h.
Referenced by getBufferId().
|
private |
An interval map containing a corresponding definition mapped to a source interval.
Definition at line 78 of file VerilogIndex.h.
Referenced by getIntervalMap(), and insertSymbol().
|
private |
Definition at line 71 of file VerilogIndex.h.
|
private |
References of symbols.
Definition at line 81 of file VerilogIndex.h.
Referenced by getReferences(), and insertSymbol().
|
private |
Definition at line 86 of file VerilogIndex.h.
Referenced by getSlangSourceManager().