Implement computeBounds.
This commit is contained in:
@@ -141,12 +141,19 @@ struct CompliationParams {
|
||||
/// `#include` directive that includes the header to speed up the parsing.
|
||||
std::optional<clang::PreambleBounds> bounds;
|
||||
|
||||
/// Output file path.
|
||||
llvm::SmallString<128> outPath;
|
||||
/// Computes the preamble bounds for the given content.
|
||||
/// If the bounds are not provided explicitly, they will be calculated based on the content.
|
||||
///
|
||||
/// - If the header is empty, the bounds can be determined by lexing the source file.
|
||||
/// - If the header is not empty, the preprocessor must be executed to compute the bounds.
|
||||
void computeBounds(llvm::StringRef header = "");
|
||||
|
||||
/// Command line arguments.
|
||||
llvm::ArrayRef<const char*> args;
|
||||
|
||||
/// Output file path.
|
||||
llvm::SmallString<128> outPath;
|
||||
|
||||
llvm::IntrusiveRefCntPtr<vfs::FileSystem> vfs = new ThreadSafeFS();
|
||||
|
||||
/// Information about reuse PCH.
|
||||
@@ -161,8 +168,6 @@ struct CompliationParams {
|
||||
uint32_t line = 0;
|
||||
uint32_t column = 0;
|
||||
|
||||
void computeBounds();
|
||||
|
||||
void addPCH(const PCHInfo& info) {
|
||||
pch = info.path;
|
||||
pchBounds = info.bounds();
|
||||
|
||||
Reference in New Issue
Block a user