From 8dd927cf03e85b942f323eebb42e06c839887ebb Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Tue, 2 Oct 2012 16:10:46 +0000 Subject: Add info in the preprocessing record whether an inclusion directive resulted in an automatic module import. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165022 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Lex/PreprocessingRecord.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/Lex/PreprocessingRecord.cpp') diff --git a/lib/Lex/PreprocessingRecord.cpp b/lib/Lex/PreprocessingRecord.cpp index 4f4ff4b51e..05fbde4944 100644 --- a/lib/Lex/PreprocessingRecord.cpp +++ b/lib/Lex/PreprocessingRecord.cpp @@ -25,10 +25,11 @@ ExternalPreprocessingRecordSource::~ExternalPreprocessingRecordSource() { } InclusionDirective::InclusionDirective(PreprocessingRecord &PPRec, InclusionKind Kind, StringRef FileName, - bool InQuotes, const FileEntry *File, + bool InQuotes, bool ImportedModule, + const FileEntry *File, SourceRange Range) : PreprocessingDirective(InclusionDirectiveKind, Range), - InQuotes(InQuotes), Kind(Kind), File(File) + InQuotes(InQuotes), Kind(Kind), ImportedModule(ImportedModule), File(File) { char *Memory = (char*)PPRec.Allocate(FileName.size() + 1, llvm::alignOf()); @@ -427,7 +428,8 @@ void PreprocessingRecord::InclusionDirective( // a token range. } clang::InclusionDirective *ID - = new (*this) clang::InclusionDirective(*this, Kind, FileName, !IsAngled, + = new (*this) clang::InclusionDirective(*this, Kind, FileName, !IsAngled, + (bool)Imported, File, SourceRange(HashLoc, EndLoc)); addPreprocessedEntity(ID); } -- cgit v1.2.3