2018-08-21 05:27:52 +00:00
|
|
|
// Copyright 2017-2018 ccls Authors
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2017-11-11 19:31:05 +00:00
|
|
|
#pragma once
|
2018-09-23 20:31:06 +00:00
|
|
|
|
2018-02-22 07:34:32 +00:00
|
|
|
#include "position.h"
|
2018-01-01 07:27:33 +00:00
|
|
|
|
2018-08-29 15:33:20 +00:00
|
|
|
#include <clang/Basic/LangOptions.h>
|
2018-09-23 20:31:06 +00:00
|
|
|
#include <clang/Basic/FileManager.h>
|
2018-08-29 05:49:53 +00:00
|
|
|
#include <clang/Basic/SourceManager.h>
|
2018-08-30 07:29:08 +00:00
|
|
|
#include <clang/Frontend/CompilerInstance.h>
|
2017-11-11 19:31:05 +00:00
|
|
|
|
2018-10-10 16:52:41 +00:00
|
|
|
#if LLVM_VERSION_MAJOR < 8
|
|
|
|
// D52783 Lift VFS from clang to llvm
|
|
|
|
namespace llvm {
|
|
|
|
namespace vfs = clang::vfs;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2018-10-28 17:49:31 +00:00
|
|
|
namespace ccls {
|
2018-09-23 20:31:06 +00:00
|
|
|
std::string PathFromFileEntry(const clang::FileEntry &file);
|
2018-05-28 00:50:02 +00:00
|
|
|
|
2018-07-29 04:32:41 +00:00
|
|
|
Range FromCharSourceRange(const clang::SourceManager &SM,
|
|
|
|
const clang::LangOptions &LangOpts,
|
|
|
|
clang::CharSourceRange R,
|
|
|
|
llvm::sys::fs::UniqueID *UniqueID = nullptr);
|
|
|
|
|
2018-08-09 17:08:14 +00:00
|
|
|
Range FromCharRange(const clang::SourceManager &SM,
|
|
|
|
const clang::LangOptions &LangOpts, clang::SourceRange R,
|
2018-07-14 23:02:59 +00:00
|
|
|
llvm::sys::fs::UniqueID *UniqueID = nullptr);
|
|
|
|
|
2018-08-09 17:08:14 +00:00
|
|
|
Range FromTokenRange(const clang::SourceManager &SM,
|
|
|
|
const clang::LangOptions &LangOpts, clang::SourceRange R,
|
2018-07-14 23:02:59 +00:00
|
|
|
llvm::sys::fs::UniqueID *UniqueID = nullptr);
|
2018-08-30 07:29:08 +00:00
|
|
|
|
2018-10-19 05:11:43 +00:00
|
|
|
Range FromTokenRangeDefaulted(const clang::SourceManager &SM,
|
|
|
|
const clang::LangOptions &Lang,
|
|
|
|
clang::SourceRange R, const clang::FileEntry *FE,
|
|
|
|
Range range);
|
|
|
|
|
2018-08-30 07:29:08 +00:00
|
|
|
std::unique_ptr<clang::CompilerInvocation>
|
2018-09-19 16:31:45 +00:00
|
|
|
BuildCompilerInvocation(std::vector<const char *> args,
|
2018-10-10 16:52:41 +00:00
|
|
|
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS);
|
2018-09-23 20:31:06 +00:00
|
|
|
|
|
|
|
const char *ClangBuiltinTypeName(int);
|
2018-10-28 17:49:31 +00:00
|
|
|
} // namespace ccls
|