Class TIndex
Unit
Neslib.Clang
Declaration
type TIndex = class(TInterfacedObject, IIndex)
Description
Implements IIndex
Hierarchy
Overview
Methods
 |
constructor Create(const AExcludeDeclarationsFromPCH, ADisplayDiagnostics: Boolean); |
 |
destructor Destroy; override; |
Description
Methods
 |
constructor Create(const AExcludeDeclarationsFromPCH, ADisplayDiagnostics: Boolean); |
Provides a shared context for creating translation units.
Example:
var
Idx: IIndex;
TU: ITranslationUnit;
begin
Idx := TIndex.Create(True, True);
TU := Idx.CreateTranslationUnit('IndexTest.pch');
TU.Cursor.VisitChildren(MyVisitor);
TU := Idx.CreateTranslationUnitFromSource('IndexTest.c', ['-Xclang',
'-include-pch=IndexTest.pch']);
TU.Cursor.VisitChildren(MyVisitor);
end;
This process of creating the 'pch', loading it separately, and using it (via -include-pch) allows 'AExcludeDeclsFromPCH' to remove redundant callbacks (which gives the indexer the same performance benefit as the compiler).
Parameters
- AExcludeDeclarationsFromPCH
- When True, allows enumeration of "local" declarations (when loading any new translation units). A "local" declaration is one that belongs in the translation unit itself and not in a precompiled header that was used by the translation unit. If False, all declarations will be enumerated.
- ADisplayDiagnostics
- TBD
|
 |
destructor Destroy; override; |
|
Generated by PasDocEx, based on PasDoc 0.14.0.
|