cpp: Fixed issue with flat includes #1115

git-svn-id: svn://ultimatepp.org/upp/trunk@8544 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-06-14 17:09:00 +00:00
parent 02fa76faa0
commit 503f2e9407
3 changed files with 1 additions and 10 deletions

View file

@ -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]);
}
}