mirror of
https://github.com/MaskRay/ccls.git
synced 2025-03-31 05:52:09 +00:00
Remove clang-c dependency from command_line.cc
This commit is contained in:
parent
c0fb407447
commit
741e357053
@ -15,7 +15,6 @@
|
|||||||
#include "typed_bidi_message_queue.h"
|
#include "typed_bidi_message_queue.h"
|
||||||
#include "working_files.h"
|
#include "working_files.h"
|
||||||
|
|
||||||
#include <clang-c/Index.h>
|
|
||||||
#include <doctest/doctest.h>
|
#include <doctest/doctest.h>
|
||||||
#include <rapidjson/istreamwrapper.h>
|
#include <rapidjson/istreamwrapper.h>
|
||||||
#include <rapidjson/ostreamwrapper.h>
|
#include <rapidjson/ostreamwrapper.h>
|
||||||
@ -1877,17 +1876,14 @@ void LanguageServerMain() {
|
|||||||
|
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
// TODO: Move to IndexInit(), remove clang-c include.
|
|
||||||
clang_enableStackTraces();
|
|
||||||
clang_toggleCrashRecovery(1);
|
|
||||||
|
|
||||||
|
|
||||||
//bool loop = true;
|
//bool loop = true;
|
||||||
//while (loop)
|
//while (loop)
|
||||||
// std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
// std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||||
//std::this_thread::sleep_for(std::chrono::seconds(3));
|
//std::this_thread::sleep_for(std::chrono::seconds(3));
|
||||||
|
|
||||||
PlatformInit();
|
PlatformInit();
|
||||||
|
IndexInit();
|
||||||
|
|
||||||
RegisterMessageTypes();
|
RegisterMessageTypes();
|
||||||
|
|
||||||
// if (argc == 1) {
|
// if (argc == 1) {
|
||||||
|
@ -1464,3 +1464,9 @@ std::vector<std::unique_ptr<IndexedFile>> Parse(FileConsumer::SharedState* file_
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void IndexInit() {
|
||||||
|
clang_enableStackTraces();
|
||||||
|
clang_toggleCrashRecovery(1);
|
||||||
|
}
|
@ -455,3 +455,4 @@ struct IndexedFile {
|
|||||||
};
|
};
|
||||||
|
|
||||||
std::vector<std::unique_ptr<IndexedFile>> Parse(FileConsumer::SharedState* file_consumer_shared, std::string filename, std::vector<std::string> args, bool dump_ast = false);
|
std::vector<std::unique_ptr<IndexedFile>> Parse(FileConsumer::SharedState* file_consumer_shared, std::string filename, std::vector<std::string> args, bool dump_ast = false);
|
||||||
|
void IndexInit();
|
Loading…
Reference in New Issue
Block a user