diff --git a/src/indexer.cc b/src/indexer.cc index 25d0d655..5fbf9fc4 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -1044,8 +1044,8 @@ void indexDeclaration(CXClientData client_data, const CXIdxDeclInfo* decl) { // TODO: Support multiple function definitions, which is common for // template specializations. if (decl->isDefinition && !is_template_specialization) { - assert(!func->def.definition_spelling); - assert(!func->def.definition_extent); + //assert(!func->def.definition_spelling); + //assert(!func->def.definition_extent); func->def.definition_spelling = decl_spelling; func->def.definition_extent = decl_extent; } diff --git a/src/utils.cc b/src/utils.cc index ada808c3..b7807e84 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -2,7 +2,6 @@ #include "platform.h" -#include #include #include @@ -15,6 +14,10 @@ #include #include +#if !defined(__APPLE__) +#include +#endif + // See http://stackoverflow.com/a/217605 void TrimStart(std::string& s) { s.erase(s.begin(), std::find_if(s.begin(), s.end(), @@ -311,7 +314,11 @@ void WriteToFile(const std::string& filename, const std::string& content) { } float GetProcessMemoryUsedInMb() { +#if defined(__APPLE__) + return 0.f; +#else const float kBytesToMb = 1000000; uint64_t memory_after = spp::GetProcessMemoryUsed(); return memory_after / kBytesToMb; -} \ No newline at end of file +#endif +}