Przeglądaj źródła

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300423 91177308-0d34-0410-b5e6-96231b3b80d8
Yaron Keren 8 lat temu
rodzic
commit
380d805e6e
1 zmienionych plików z 2 dodań i 3 usunięć
  1. 2 3
      lib/Lex/PPLexerChange.cpp

+ 2 - 3
lib/Lex/PPLexerChange.cpp

@@ -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) &&