]> granicus.if.org Git - clang/commitdiff
Use setUsedForHeaderGuard() accessor function instead of direcly accessing UsedForHea...
authorYaron Keren <yaron.keren@gmail.com>
Sun, 16 Apr 2017 15:53:19 +0000 (15:53 +0000)
committerYaron Keren <yaron.keren@gmail.com>
Sun, 16 Apr 2017 15:53:19 +0000 (15:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300423 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/PPLexerChange.cpp

index 4db17c344b6779ab54231e51b1abfecffa023ed4..cf0c953b61f805a1fde0e4354a903706901b03b7 100644 (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) &&