mirror of
https://github.com/MaskRay/ccls.git
synced 2024-12-02 12:27:07 +00:00
36 lines
1.2 KiB
C++
36 lines
1.2 KiB
C++
#pragma once
|
|
#include "position.h"
|
|
#include "working_files.h"
|
|
|
|
#include <clang/Frontend/ASTUnit.h>
|
|
#include <clang/Frontend/CompilerInstance.h>
|
|
#include <llvm/Support/CrashRecoveryContext.h>
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <stdlib.h>
|
|
|
|
std::vector<clang::ASTUnit::RemappedFile>
|
|
GetRemapped(const WorkingFiles::Snapshot &snapshot);
|
|
|
|
Range FromCharRange(const clang::SourceManager &SM, const clang::LangOptions &LangOpts,
|
|
clang::SourceRange R,
|
|
llvm::sys::fs::UniqueID *UniqueID = nullptr);
|
|
|
|
Range FromTokenRange(const clang::SourceManager &SM, const clang::LangOptions &LangOpts,
|
|
clang::SourceRange R,
|
|
llvm::sys::fs::UniqueID *UniqueID = nullptr);
|
|
|
|
struct ClangTranslationUnit {
|
|
static std::unique_ptr<ClangTranslationUnit>
|
|
Create(const std::string &filepath, const std::vector<std::string> &args,
|
|
const WorkingFiles::Snapshot &snapshot, bool diagnostic);
|
|
|
|
int Reparse(llvm::CrashRecoveryContext &CRC,
|
|
const WorkingFiles::Snapshot &snapshot);
|
|
|
|
std::shared_ptr<clang::PCHContainerOperations> PCHCO;
|
|
std::unique_ptr<clang::ASTUnit> Unit;
|
|
};
|