mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-13 13:45:16 +00:00
[clangd] Cleanup FuzzyFindRequest serialization and dex benchmark
* Due to the LLVM's JSON library changes (?), FuzzyFindRequest serialization is no longer valid since arrays are serialized as llvm::json::Array already. Hence, current implementation creates a nested array. * YAML format is no longer the default, mention this for the benchmark. * FIXME is no longer relevant. I ran benchmarks that showed no improvement with priority_queue years ago. Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D106432
This commit is contained in:
parent
d6da02d952
commit
907efdf95d
@ -106,7 +106,7 @@ BENCHMARK(DexBuild);
|
||||
int main(int argc, char *argv[]) {
|
||||
if (argc < 3) {
|
||||
llvm::errs() << "Usage: " << argv[0]
|
||||
<< " global-symbol-index.yaml requests.json "
|
||||
<< " global-symbol-index.dex requests.json "
|
||||
"BENCHMARK_OPTIONS...\n";
|
||||
return -1;
|
||||
}
|
||||
|
@ -49,12 +49,12 @@ bool fromJSON(const llvm::json::Value &Parameters, FuzzyFindRequest &Request,
|
||||
llvm::json::Value toJSON(const FuzzyFindRequest &Request) {
|
||||
return llvm::json::Object{
|
||||
{"Query", Request.Query},
|
||||
{"Scopes", llvm::json::Array{Request.Scopes}},
|
||||
{"Scopes", Request.Scopes},
|
||||
{"AnyScope", Request.AnyScope},
|
||||
{"Limit", Request.Limit},
|
||||
{"RestrictForCodeCompletion", Request.RestrictForCodeCompletion},
|
||||
{"ProximityPaths", llvm::json::Array{Request.ProximityPaths}},
|
||||
{"PreferredTypes", llvm::json::Array{Request.PreferredTypes}},
|
||||
{"ProximityPaths", Request.ProximityPaths},
|
||||
{"PreferredTypes", Request.PreferredTypes},
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -207,7 +207,6 @@ private:
|
||||
return OS;
|
||||
}
|
||||
|
||||
// FIXME(kbobyrev): Would storing Children in min-heap be faster?
|
||||
std::vector<std::unique_ptr<Iterator>> Children;
|
||||
friend Corpus; // For optimizations.
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user