diff --git a/uppsrc/CppBase/CppBase.h b/uppsrc/CppBase/CppBase.h index f7cfeac31..2b3a9f127 100644 --- a/uppsrc/CppBase/CppBase.h +++ b/uppsrc/CppBase/CppBase.h @@ -104,7 +104,6 @@ bool IncludesFile(const String& parent_path, const String& header_path); struct FlatPP { Index segment_id; Index usings; - Index includes; }; const FlatPP& GetFlatPPFile(const char *path); // with #includes resolved diff --git a/uppsrc/CppBase/cpp.cpp b/uppsrc/CppBase/cpp.cpp index 0da6b2df6..f7befe67d 100644 --- a/uppsrc/CppBase/cpp.cpp +++ b/uppsrc/CppBase/cpp.cpp @@ -155,21 +155,16 @@ void Cpp::DoFlatInclude(const String& header_path) LLOG("Flat include " << header_path); if(header_path.GetCount()) { md5.Put(header_path); - if(visited.Find(header_path) >= 0) - return; - visited.Add(header_path); const FlatPP& pp = GetFlatPPFile(header_path); LLOG("DoFlatInclude " << header_path << ", " << pp.segment_id.GetCount() << " segments"); for(int i = 0; i < pp.segment_id.GetCount(); i++) segment_id.FindAdd(pp.segment_id[i]); for(int i = 0; i < pp.usings.GetCount(); i++) { namespace_using.FindAdd(pp.usings[i]); - LLOG("Flat usings " << pp.usings[i]); + LLOG(" Flat usings " << pp.usings[i]); md5.Put('$'); md5.Put(pp.usings[i]); } - for(int i = 0; i < pp.includes.GetCount(); i++) - visited.FindAdd(pp.includes[i]); } } diff --git a/uppsrc/CppBase/ppfile.cpp b/uppsrc/CppBase/ppfile.cpp index c243d5227..ec853099a 100644 --- a/uppsrc/CppBase/ppfile.cpp +++ b/uppsrc/CppBase/ppfile.cpp @@ -452,7 +452,6 @@ const FlatPP& GetFlatPPFile(const char *path, Index& visited) const PPFile& pp = GetPPFile(path); int n = visited.GetCount(); visited.FindAdd(path); - fp.includes.FindAdd(path); for(int i = 0; i < pp.item.GetCount(); i++) { const PPItem& m = pp.item[i]; if(m.type == PP_INCLUDE) { @@ -465,8 +464,6 @@ const FlatPP& GetFlatPPFile(const char *path, Index& visited) fp.segment_id.FindAdd(pp.segment_id[i]); for(int i = 0; i < pp.usings.GetCount(); i++) fp.usings.FindAdd(pp.usings[i]); - for(int i = 0; i < pp.includes.GetCount(); i++) - fp.includes.FindAdd(pp.includes[i]); } } else