mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-28 18:41:57 +00:00
use sparsehash
This commit is contained in:
parent
820a1dc093
commit
22cc140d80
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -4,3 +4,6 @@
|
|||||||
[submodule "third_party/doctest"]
|
[submodule "third_party/doctest"]
|
||||||
path = third_party/doctest
|
path = third_party/doctest
|
||||||
url = https://github.com/onqtam/doctest
|
url = https://github.com/onqtam/doctest
|
||||||
|
[submodule "third_party/sparsehash"]
|
||||||
|
path = third_party/sparsehash
|
||||||
|
url = https://github.com/sparsehash/sparsehash
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
#include "indexer.h"
|
#include "indexer.h"
|
||||||
#include "serializer.h"
|
#include "serializer.h"
|
||||||
|
|
||||||
|
#include <sparsehash/dense_hash_map>
|
||||||
|
|
||||||
using Usr = std::string;
|
using Usr = std::string;
|
||||||
|
|
||||||
struct QueryableFile;
|
struct QueryableFile;
|
||||||
@ -234,7 +236,12 @@ struct QueryableDatabase {
|
|||||||
std::vector<QueryableVarDef> vars;
|
std::vector<QueryableVarDef> vars;
|
||||||
|
|
||||||
// Lookup symbol based on a usr.
|
// Lookup symbol based on a usr.
|
||||||
std::unordered_map<Usr, SymbolIdx> usr_to_symbol;
|
google::dense_hash_map<Usr, SymbolIdx> usr_to_symbol;
|
||||||
|
|
||||||
|
QueryableDatabase() {
|
||||||
|
usr_to_symbol.set_empty_key("");
|
||||||
|
}
|
||||||
|
//std::unordered_map<Usr, SymbolIdx> usr_to_symbol;
|
||||||
|
|
||||||
// Insert the contents of |update| into |db|.
|
// Insert the contents of |update| into |db|.
|
||||||
void ApplyIndexUpdate(IndexUpdate* update);
|
void ApplyIndexUpdate(IndexUpdate* update);
|
||||||
|
1
third_party/sparsehash
vendored
Submodule
1
third_party/sparsehash
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 4cb924025b8c622d1a1e11f4c1e9db15410c75fb
|
5
wscript
5
wscript
@ -88,15 +88,16 @@ def build(bld):
|
|||||||
excl=['libcxx/*', '*tests/*', 'third_party/*'])
|
excl=['libcxx/*', '*tests/*', 'third_party/*'])
|
||||||
bld.program(
|
bld.program(
|
||||||
source=cc_files,
|
source=cc_files,
|
||||||
cxxflags=['-std=c++11', '-Wall'],
|
cxxflags=['-O3', '-std=c++11', '-Wall'],
|
||||||
includes=[
|
includes=[
|
||||||
'third_party/',
|
'third_party/',
|
||||||
'third_party/doctest/',
|
'third_party/doctest/',
|
||||||
'third_party/rapidjson/include',
|
'third_party/rapidjson/include',
|
||||||
|
'third_party/sparsehash/src',
|
||||||
CLANG_INCLUDE_DIR],
|
CLANG_INCLUDE_DIR],
|
||||||
lib=[
|
lib=[
|
||||||
'clang',
|
'clang',
|
||||||
#'rt',
|
'rt',
|
||||||
'pthread'],
|
'pthread'],
|
||||||
libpath=[CLANG_LIB_DIR],
|
libpath=[CLANG_LIB_DIR],
|
||||||
rpath=[CLANG_LIB_DIR],
|
rpath=[CLANG_LIB_DIR],
|
||||||
|
Loading…
Reference in New Issue
Block a user