Use setUsedForHeaderGuard() accessor function instead of direcly accessing UsedForHeaderGuard.

llvm-svn: 300423
This commit is contained in:
Yaron Keren 2017-04-16 15:53:19 +00:00
parent 16b20d2fc5
commit 9370ea2058
1 changed files with 2 additions and 3 deletions

View File

@ -303,9 +303,8 @@ bool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {
if (const FileEntry *FE = CurPPLexer->getFileEntry()) {
HeaderInfo.SetFileControllingMacro(FE, ControllingMacro);
if (MacroInfo *MI =
getMacroInfo(const_cast<IdentifierInfo*>(ControllingMacro))) {
MI->UsedForHeaderGuard = true;
}
getMacroInfo(const_cast<IdentifierInfo*>(ControllingMacro)))
MI->setUsedForHeaderGuard(true);
if (const IdentifierInfo *DefinedMacro =
CurPPLexer->MIOpt.GetDefinedMacro()) {
if (!isMacroDefined(ControllingMacro) &&