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

Yaron Keren via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 16 08:53:20 PDT 2017


Author: yrnkrn
Date: Sun Apr 16 10:53:19 2017
New Revision: 300423

URL: http://llvm.org/viewvc/llvm-project?rev=300423&view=rev
Log:
Use setUsedForHeaderGuard() accessor function instead of direcly accessing UsedForHeaderGuard.

Modified:
    cfe/trunk/lib/Lex/PPLexerChange.cpp

Modified: cfe/trunk/lib/Lex/PPLexerChange.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPLexerChange.cpp?rev=300423&r1=300422&r2=300423&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPLexerChange.cpp (original)
+++ cfe/trunk/lib/Lex/PPLexerChange.cpp Sun Apr 16 10:53:19 2017
@@ -303,9 +303,8 @@ bool Preprocessor::HandleEndOfFile(Token
       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) &&




More information about the cfe-commits mailing list