From 2a3ee89349ce50c2af888687867c2acc1e6af568 Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Wed, 29 Mar 2017 10:12:00 -0700 Subject: [PATCH] wip --- src/clang_args | 14 ++++++++++---- src/platform_linux.cc | 3 ++- src/query.cc | 9 ++++++++- wscript | 2 +- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/clang_args b/src/clang_args index 76bff66f..72392f12 100644 --- a/src/clang_args +++ b/src/clang_args @@ -3,10 +3,16 @@ -std=c++11 # Includes --IC:/Users/jacob/Desktop/superindex/indexer/third_party --IC:/Users/jacob/Desktop/superindex/indexer/third_party/doctest/doctest --IC:/Users/jacob/Desktop/superindex/indexer/third_party/rapidjson/include --IC:/Program Files/LLVM/include +# Windows +#-IC:/Users/jacob/Desktop/superindex/indexer/third_party +#-IC:/Users/jacob/Desktop/superindex/indexer/third_party/doctest +#-IC:/Users/jacob/Desktop/superindex/indexer/third_party/rapidjson/include +#-IC:/Program Files/LLVM/include +# OSX +-I/Users/jdufault/Personal/super-clang-index/third_party +-I/Users/jdufault/Personal/super-clang-index/third_party/doctest +-I/Users/jdufault/Personal/super-clang-index/third_party/rapidjson/include +-I/Users/jdufault/Personal/super-clang-index/build/clang+llvm-4.0.0-x86_64-apple-darwin/include # Use libcxx #-stdlib=libc++ diff --git a/src/platform_linux.cc b/src/platform_linux.cc index 77b67bf0..c3e7ad58 100644 --- a/src/platform_linux.cc +++ b/src/platform_linux.cc @@ -142,7 +142,8 @@ std::vector GetPlatformClangArguments() { return { "-stdlib=libc++", "-nostdinc++", - "-I/usr/local/Cellar/llvm/3.9.1/include" + //"-I/usr/local/Cellar/llvm/3.9.1/include", + "-I/Users/jdufault/Personal/super-clang-index/libcxx/include" }; } #undef CHECKED diff --git a/src/query.cc b/src/query.cc index 0323c21c..fe4f0991 100644 --- a/src/query.cc +++ b/src/query.cc @@ -131,10 +131,17 @@ QueryableVarDef::DefUpdate MapIdToUsr(const IdCache& id_cache, const VarDefDefin QueryableFile::QueryableFile(const IndexedFile& indexed) : file_id(indexed.path) { + // TODO: investigate this + //std::cerr << "Adding QueryableFile for " << indexed.path + // << ", file_path_to_file_id.size()=" << indexed.id_cache.file_path_to_file_id.size() << std::endl; + //for (auto& entry : indexed.id_cache.file_path_to_file_id) + // std::cerr << "-" << entry.first << std::endl; + //assert(indexed.id_cache.file_path_to_file_id.find(indexed.path) != + // indexed.id_cache.file_path_to_file_id.end()); auto it = indexed.id_cache.file_path_to_file_id.find(indexed.path); if (it == indexed.id_cache.file_path_to_file_id.end()) { // TODO: investigate - std::cerr << "Unable to find cached file " << indexed.path << std::endl; + std::cerr << "!!! FIXME !!! Unable to find cached file " << indexed.path << std::endl; return; } diff --git a/wscript b/wscript index d00cf916..aceb42e1 100644 --- a/wscript +++ b/wscript @@ -85,7 +85,7 @@ def build(bld): print('CLANG_LIB_DIR: {0}'.format(CLANG_LIB_DIR)) cc_files = bld.path.ant_glob(['**/*.cpp', '**/*.cc'], - excl=['*tests/*', 'third_party/*']) + excl=['libcxx/*', '*tests/*', 'third_party/*']) bld.program( source=cc_files, cxxflags=['-std=c++11', '-Wall'],