name types for (trace|read)ability

This commit is contained in:
Felipe Lema 2021-04-12 14:31:45 -04:00
parent 013b655e4c
commit a4de46b9a0
2 changed files with 8 additions and 3 deletions

View File

@ -10,8 +10,10 @@
namespace ccls {
struct Pos {
uint16_t line = 0;
int16_t column = -1;
using Line=uint16_t;
Line line = 0;
using Column=int16_t;
Column column = -1;
static Pos fromString(const std::string &encoded);

View File

@ -146,7 +146,10 @@ using Lid2file_id = std::unordered_map<int, int>;
struct DB {
std::vector<QueryFile> files;
llvm::StringMap<int> name2file_id;
llvm::DenseMap<Usr, int, DenseMapInfoForUsr> func_usr, type_usr, var_usr;
//! Underlying type used for indexes-of-Usr
using UsrIndex=int;
//! Usr → index
llvm::DenseMap<Usr, UsrIndex, DenseMapInfoForUsr> func_usr, type_usr, var_usr;
llvm::SmallVector<QueryFunc, 0> funcs;
llvm::SmallVector<QueryType, 0> types;
llvm::SmallVector<QueryVar, 0> vars;