forked from OSchip/llvm-project
clear file info after processing one file, it shouldn't carry over to the
next. llvm-svn: 39211
This commit is contained in:
parent
2ea9dd7fc0
commit
00348acace
|
@ -939,8 +939,11 @@ static void ProcessInputFile(const std::string &InFile,
|
|||
if (Stats) {
|
||||
PP.PrintStats();
|
||||
PP.getIdentifierTable().PrintStats();
|
||||
HeaderInfo.PrintStats();
|
||||
std::cerr << "\n";
|
||||
}
|
||||
|
||||
HeaderInfo.ClearFileInfo();
|
||||
}
|
||||
|
||||
static cl::list<std::string>
|
||||
|
@ -988,7 +991,6 @@ int main(int argc, char **argv) {
|
|||
HeaderSearch HeaderInfo(FileMgr);
|
||||
InitializeIncludePaths(HeaderInfo, FileMgr, Diags, LangInfo);
|
||||
|
||||
|
||||
for (unsigned i = 0, e = InputFilenames.size(); i != e; ++i)
|
||||
ProcessInputFile(InputFilenames[i], SourceMgr, Diags,
|
||||
HeaderInfo, *Target, LangInfo);
|
||||
|
@ -998,7 +1000,6 @@ int main(int argc, char **argv) {
|
|||
|
||||
if (Stats) {
|
||||
// Printed from high-to-low level.
|
||||
HeaderInfo.PrintStats();
|
||||
SourceMgr.PrintStats();
|
||||
FileMgr.PrintStats();
|
||||
std::cerr << "\n";
|
||||
|
|
|
@ -91,6 +91,11 @@ public:
|
|||
NoCurDirSearch = noCurDirSearch;
|
||||
}
|
||||
|
||||
/// ClearFileInfo - Forget everything we know about headers so far.
|
||||
void ClearFileInfo() {
|
||||
FileInfo.clear();
|
||||
}
|
||||
|
||||
/// LookupFile - Given a "foo" or <foo> reference, look up the indicated file,
|
||||
/// return null on failure. isAngled indicates whether the file reference is
|
||||
/// a <> reference. If successful, this returns 'UsedDir', the
|
||||
|
|
Loading…
Reference in New Issue