<div dir="ltr">My understanding is that r302938 makes clang generate incorrect code (clang itself), which lead to unexpected clang behavior. Is it correct? If yes, how can I reproduce this issue so that I can try to triage/fix the problem?<div><br></div><div>Thanks,</div><div>Dehao</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 18, 2017 at 1:22 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><span class=""><div><div class="gmail_extra"><div class="gmail_quote">On 18 May 2017 1:19 pm, "Richard Smith" <<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>> wrote:<br type="attribution"><blockquote class="m_-4556210224183668740quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div class="m_-4556210224183668740quoted-text"><div><div class="gmail_extra"><div class="gmail_quote">On 18 May 2017 1:14 pm, "Dehao Chen" <<a href="mailto:dehao@google.com" target="_blank">dehao@google.com</a>> wrote:<br type="attribution"><blockquote class="m_-4556210224183668740m_3415543219902628744quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">What's the issue? Build breaking? Performance regression? It's not clear from the limit info in this thread...</div></blockquote></div></div></div><div dir="auto"><br></div></div><div dir="auto">r302938 introduced or exposed a miscompile that causes a stage2 msan build of Clang to misbehave:</div></div></blockquote></div></div></div><div dir="auto"><br></div></span><div dir="auto">To be fair, we don't know for sure that it's a miscompile. This code works with older clang and with other compilers and is clean under the sanitizers, but it might still be that there's some UB here.</div><div><div class="h5"><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="m_-4556210224183668740quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div dir="auto"><a href="http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/1349/steps/check-clang%20msan/logs/stdio" target="_blank">http://lab.llvm.org:8011/build<wbr>ers/sanitizer-x86_64-linux-<wbr>bootstrap/builds/1349/steps/<wbr>check-clang%20msan/logs/stdio</a><br></div><div dir="auto"><br></div><div dir="auto">From my post to another branch of this thread:</div><div class="m_-4556210224183668740quoted-text"><div dir="auto"><br></div><div dir="auto"><span style="font-family:sans-serif;font-size:9.856px">I grabbed a clang binary from the build bot and have been trying to figure out what's gone wrong. So far it looks like the msan-enabled stage1 miscompiled some part of clang's lib/Lex/TokenLexer.cpp (but I'm not sure of that). It *looks* like TokenLexer::</span><span style="font-family:sans-serif;font-size:9.856px">ExpandFunctionArgu<wbr>ments is corrupting the Flags member of the token, somewhere around the "if (!VaArgsPseudoPaste)" block. I see what looks like a Token::Flags value of 0x2150, which is garbage: the highest assigned flag is 0x400.</span><br></div><div dir="auto"><br></div></div><div class="m_-4556210224183668740elided-text"><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="m_-4556210224183668740m_3415543219902628744quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><font color="#888888"><div>Dehao</div></font></div><div class="m_-4556210224183668740m_3415543219902628744elided-text"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 18, 2017 at 1:02 PM, Vitaly Buka <span dir="ltr"><<a href="mailto:vitalybuka@google.com" target="_blank">vitalybuka@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="color:rgb(33,33,33);font-size:12.8px">Local build: r302937 no issue, </span><span style="color:rgb(33,33,33);font-size:12.8px">r302938 has issue.</span></div><div class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784HOEnZb"><div class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784h5"><br><div class="gmail_quote"><div dir="ltr">On Thu, May 18, 2017 at 7:23 AM Dehao Chen <<a href="mailto:dehao@google.com" target="_blank">dehao@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Could you give some context on how <span style="font-size:12.8px">r302938 is related to this?</span><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Thanks,</span></div><div><span style="font-size:12.8px">Dehao</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 17, 2017 at 11:14 PM, Vitaly Buka <span dir="ltr"><<a href="mailto:vitalybuka@google.com" target="_blank">vitalybuka@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><a class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382GWVZpf m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382cremed m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382gW" id="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382IloFPc-0" href="mailto:dehao@google.com" target="_blank">+Dehao Chen</a> <br></div>it started from r302938<div><br><div class="gmail_quote"><div dir="ltr">On Wed, May 17, 2017 at 8:09 PM Jordan Rose via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382cremed" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Thanks, this is helpful!</div></div><div style="word-wrap:break-word"><div><br></div><div><br></div><div><blockquote type="cite"><div>On May 16, 2017, at 12:26, Richard Smith <<a href="mailto:richard@metafoo.co.uk" class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382cremed" target="_blank">richard@metafoo.co.uk</a>> wrote:</div><br class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382m_-122113552817655321m_222920718454630186Apple-interchange-newline"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 15 May 2017 at 10:28, Jordan Rose via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382cremed" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, Richard. Swift was using this information in order to put imported macros in a particular context. It wouldn't surprise me to hear that we were doing it wrong, and that there's a better way to go from a macro back to a module, but is there a recommended replacement?<br></blockquote><div><br></div><div>The recommended way to connect macros to modules is via the ModuleMacro objects, which represent a macro exported from a module. You can query the exported macro for a (module, identifier) pair with Preprocessor::getModuleMacro, or walk the ModuleMacro graph for an identifier by starting from Preprocessor::getLeafModuleMac<wbr>ros.</div><div><br></div><div>If you alternatively want to know the set of macros that would be visible with a given set of imports, after setting up that state you can walk the range produced by Preprocessor::macros(true) and query getActiveModuleMacros on each MacroState.</div><div><br></div><div>If you want to know "what is the set of macros exported directly by this module?", we don't have a prebuilt mechanism for that, since no in-tree client wants that information, but one way would be to walk macros(true) and query getModuleMacro(module, identifier) on each one.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks,<br>
Jordan<br>
<div class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382m_-122113552817655321m_222920718454630186HOEnZb"><div class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382m_-122113552817655321m_222920718454630186h5"><br>
<br>
> On May 12, 2017, at 16:40, Richard Smith via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382cremed" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br>
><br>
> Author: rsmith<br>
> Date: Fri May 12 18:40:52 2017<br>
> New Revision: 302966<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=302966&view=rev" rel="noreferrer" class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382cremed" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject?rev=302966&view=rev</a><br>
> Log:<br>
> Remove unused tracking of owning module for MacroInfo objects.<br>
><br>
> Modified:<br>
>    cfe/trunk/include/clang/Lex/Ma<wbr>croInfo.h<br>
>    cfe/trunk/include/clang/Lex/Pr<wbr>eprocessor.h<br>
>    cfe/trunk/lib/Lex/MacroInfo.cp<wbr>p<br>
>    cfe/trunk/lib/Lex/PPDirectives<wbr>.cpp<br>
>    cfe/trunk/lib/Lex/Preprocessor<wbr>.cpp<br>
>    cfe/trunk/lib/Serialization/AS<wbr>TReader.cpp<br>
>    cfe/trunk/lib/Serialization/AS<wbr>TWriter.cpp<br>
><br>
> Modified: cfe/trunk/include/clang/Lex/Ma<wbr>croInfo.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/MacroInfo.h?rev=302966&r1=302965&r2=302966&view=diff" rel="noreferrer" class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382cremed" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/include/clang/<wbr>Lex/MacroInfo.h?rev=302966&r1=<wbr>302965&r2=302966&view=diff</a><br>
> ==============================<wbr>==============================<wbr>==================<br>
> --- cfe/trunk/include/clang/Lex/Ma<wbr>croInfo.h (original)<br>
> +++ cfe/trunk/include/clang/Lex/Ma<wbr>croInfo.h Fri May 12 18:40:52 2017<br>
> @@ -105,9 +105,6 @@ class MacroInfo {<br>
>   /// \brief Must warn if the macro is unused at the end of translation unit.<br>
>   bool IsWarnIfUnused : 1;<br>
><br>
> -  /// \brief Whether this macro info was loaded from an AST file.<br>
> -  bool FromASTFile : 1;<br>
> -<br>
>   /// \brief Whether this macro was used as header guard.<br>
>   bool UsedForHeaderGuard : 1;<br>
><br>
> @@ -264,34 +261,16 @@ public:<br>
>     IsDisabled = true;<br>
>   }<br>
><br>
> -  /// \brief Determine whether this macro info came from an AST file (such as<br>
> -  /// a precompiled header or module) rather than having been parsed.<br>
> -  bool isFromASTFile() const { return FromASTFile; }<br>
> -<br>
>   /// \brief Determine whether this macro was used for a header guard.<br>
>   bool isUsedForHeaderGuard() const { return UsedForHeaderGuard; }<br>
><br>
>   void setUsedForHeaderGuard(bool Val) { UsedForHeaderGuard = Val; }<br>
><br>
> -  /// \brief Retrieve the global ID of the module that owns this particular<br>
> -  /// macro info.<br>
> -  unsigned getOwningModuleID() const {<br>
> -    if (isFromASTFile())<br>
> -      return *(const unsigned *)(this + 1);<br>
> -<br>
> -    return 0;<br>
> -  }<br>
> -<br>
>   void dump() const;<br>
><br>
> private:<br>
>   unsigned getDefinitionLengthSlow(const SourceManager &SM) const;<br>
><br>
> -  void setOwningModuleID(unsigned ID) {<br>
> -    assert(isFromASTFile());<br>
> -    *(unsigned *)(this + 1) = ID;<br>
> -  }<br>
> -<br>
>   friend class Preprocessor;<br>
> };<br>
><br>
><br>
> Modified: cfe/trunk/include/clang/Lex/Pr<wbr>eprocessor.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/Preprocessor.h?rev=302966&r1=302965&r2=302966&view=diff" rel="noreferrer" class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382cremed" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/include/clang/<wbr>Lex/Preprocessor.h?rev=302966&<wbr>r1=302965&r2=302966&view=diff</a><br>
> ==============================<wbr>==============================<wbr>==================<br>
> --- cfe/trunk/include/clang/Lex/Pr<wbr>eprocessor.h (original)<br>
> +++ cfe/trunk/include/clang/Lex/Pr<wbr>eprocessor.h Fri May 12 18:40:52 2017<br>
> @@ -644,14 +644,6 @@ class Preprocessor {<br>
>   /// of that list.<br>
>   MacroInfoChain *MIChainHead;<br>
><br>
> -  struct DeserializedMacroInfoChain {<br>
> -    MacroInfo MI;<br>
> -    unsigned OwningModuleID; // MUST be immediately after the MacroInfo object<br>
> -                     // so it can be accessed by MacroInfo::getOwningModuleID()<wbr>.<br>
> -    DeserializedMacroInfoChain *Next;<br>
> -  };<br>
> -  DeserializedMacroInfoChain *DeserialMIChainHead;<br>
> -<br>
>   void updateOutOfDateIdentifier(Iden<wbr>tifierInfo &II) const;<br>
><br>
> public:<br>
> @@ -1669,10 +1661,6 @@ public:<br>
>   /// \brief Allocate a new MacroInfo object with the provided SourceLocation.<br>
>   MacroInfo *AllocateMacroInfo(SourceLocat<wbr>ion L);<br>
><br>
> -  /// \brief Allocate a new MacroInfo object loaded from an AST file.<br>
> -  MacroInfo *AllocateDeserializedMacroInfo<wbr>(SourceLocation L,<br>
> -                                           unsigned SubModuleID);<br>
> -<br>
>   /// \brief Turn the specified lexer token into a fully checked and spelled<br>
>   /// filename, e.g. as an operand of \#include.<br>
>   ///<br>
> @@ -1764,9 +1752,6 @@ private:<br>
>   /// macro name.<br>
>   void updateModuleMacroInfo(const IdentifierInfo *II, ModuleMacroInfo &Info);<br>
><br>
> -  /// \brief Allocate a new MacroInfo object.<br>
> -  MacroInfo *AllocateMacroInfo();<br>
> -<br>
>   DefMacroDirective *AllocateDefMacroDirective(Mac<wbr>roInfo *MI,<br>
>                                                SourceLocation Loc);<br>
>   UndefMacroDirective *AllocateUndefMacroDirective(S<wbr>ourceLocation UndefLoc);<br>
><br>
> Modified: cfe/trunk/lib/Lex/MacroInfo.cp<wbr>p<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/MacroInfo.cpp?rev=302966&r1=302965&r2=302966&view=diff" rel="noreferrer" class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382cremed" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/lib/Lex/MacroI<wbr>nfo.cpp?rev=302966&r1=302965&r<wbr>2=302966&view=diff</a><br>
> ==============================<wbr>==============================<wbr>==================<br>
> --- cfe/trunk/lib/Lex/MacroInfo.cp<wbr>p (original)<br>
> +++ cfe/trunk/lib/Lex/MacroInfo.cp<wbr>p Fri May 12 18:40:52 2017<br>
> @@ -29,7 +29,6 @@ MacroInfo::MacroInfo(SourceLoc<wbr>ation DefL<br>
>     IsUsed(false),<br>
>     IsAllowRedefinitionsWithoutWa<wbr>rning(false),<br>
>     IsWarnIfUnused(false),<br>
> -    FromASTFile(false),<br>
>     UsedForHeaderGuard(false) {<br>
> }<br>
><br>
> @@ -137,7 +136,6 @@ LLVM_DUMP_METHOD void MacroInfo::dump()<br>
>   if (IsAllowRedefinitionsWithoutWa<wbr>rning)<br>
>     Out << " allow_redefinitions_without_wa<wbr>rning";<br>
>   if (IsWarnIfUnused) Out << " warn_if_unused";<br>
> -  if (FromASTFile) Out << " imported";<br>
>   if (UsedForHeaderGuard) Out << " header_guard";<br>
><br>
>   Out << "\n    #define <macro>";<br>
><br>
> Modified: cfe/trunk/lib/Lex/PPDirectives<wbr>.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPDirectives.cpp?rev=302966&r1=302965&r2=302966&view=diff" rel="noreferrer" class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382cremed" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/lib/Lex/PPDire<wbr>ctives.cpp?rev=302966&r1=30296<wbr>5&r2=302966&view=diff</a><br>
> ==============================<wbr>==============================<wbr>==================<br>
> --- cfe/trunk/lib/Lex/PPDirectives<wbr>.cpp (original)<br>
> +++ cfe/trunk/lib/Lex/PPDirectives<wbr>.cpp Fri May 12 18:40:52 2017<br>
> @@ -54,35 +54,12 @@ using namespace clang;<br>
> // Utility Methods for Preprocessor Directive Handling.<br>
> //===-------------------------<wbr>------------------------------<wbr>---------------===//<br>
><br>
> -MacroInfo *Preprocessor::AllocateMacroIn<wbr>fo() {<br>
> -  MacroInfoChain *MIChain = BP.Allocate<MacroInfoChain>();<br>
> -  MIChain->Next = MIChainHead;<br>
> +MacroInfo *Preprocessor::AllocateMacroIn<wbr>fo(SourceLocation L) {<br>
> +  auto *MIChain = new (BP) MacroInfoChain{L, MIChainHead};<br>
>   MIChainHead = MIChain;<br>
>   return &MIChain->MI;<br>
> }<br>
><br>
> -MacroInfo *Preprocessor::AllocateMacroIn<wbr>fo(SourceLocation L) {<br>
> -  MacroInfo *MI = AllocateMacroInfo();<br>
> -  new (MI) MacroInfo(L);<br>
> -  return MI;<br>
> -}<br>
> -<br>
> -MacroInfo *Preprocessor::AllocateDeseria<wbr>lizedMacroInfo(SourceLocation L,<br>
> -                                                       unsigned SubModuleID) {<br>
> -  static_assert(alignof(MacroInf<wbr>o) >= sizeof(SubModuleID),<br>
> -                "alignment for MacroInfo is less than the ID");<br>
> -  DeserializedMacroInfoChain *MIChain =<br>
> -      BP.Allocate<DeserializedMacroI<wbr>nfoChain>();<br>
> -  MIChain->Next = DeserialMIChainHead;<br>
> -  DeserialMIChainHead = MIChain;<br>
> -<br>
> -  MacroInfo *MI = &MIChain->MI;<br>
> -  new (MI) MacroInfo(L);<br>
> -  MI->FromASTFile = true;<br>
> -  MI->setOwningModuleID(SubModul<wbr>eID);<br>
> -  return MI;<br>
> -}<br>
> -<br>
> DefMacroDirective *Preprocessor::AllocateDefMacr<wbr>oDirective(MacroInfo *MI,<br>
>                                                            SourceLocation Loc) {<br>
>   return new (BP) DefMacroDirective(MI, Loc);<br>
><br>
> Modified: cfe/trunk/lib/Lex/Preprocessor<wbr>.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Preprocessor.cpp?rev=302966&r1=302965&r2=302966&view=diff" rel="noreferrer" class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382cremed" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/lib/Lex/Prepro<wbr>cessor.cpp?rev=302966&r1=30296<wbr>5&r2=302966&view=diff</a><br>
> ==============================<wbr>==============================<wbr>==================<br>
> --- cfe/trunk/lib/Lex/Preprocessor<wbr>.cpp (original)<br>
> +++ cfe/trunk/lib/Lex/Preprocessor<wbr>.cpp Fri May 12 18:40:52 2017<br>
> @@ -88,7 +88,7 @@ Preprocessor::Preprocessor(std<wbr>::shared_p<br>
>       CurDirLookup(nullptr), CurLexerKind(CLK_Lexer),<br>
>       CurLexerSubmodule(nullptr), Callbacks(nullptr),<br>
>       CurSubmoduleState(&NullSubmod<wbr>uleState), MacroArgCache(nullptr),<br>
> -      Record(nullptr), MIChainHead(nullptr), DeserialMIChainHead(nullptr) {<br>
> +      Record(nullptr), MIChainHead(nullptr) {<br>
>   OwnsHeaderSearch = OwnsHeaders;<br>
><br>
>   CounterValue = 0; // __COUNTER__ starts at 0.<br>
> @@ -169,11 +169,6 @@ Preprocessor::~Preprocessor() {<br>
>   std::fill(TokenLexerCache, TokenLexerCache + NumCachedTokenLexers, nullptr);<br>
>   CurTokenLexer.reset();<br>
><br>
> -  while (DeserializedMacroInfoChain *I = DeserialMIChainHead) {<br>
> -    DeserialMIChainHead = I->Next;<br>
> -    I->~DeserializedMacroInfoChain<wbr>();<br>
> -  }<br>
> -<br>
>   // Free any cached MacroArgs.<br>
>   for (MacroArgs *ArgList = MacroArgCache; ArgList;)<br>
>     ArgList = ArgList->deallocate();<br>
><br>
> Modified: cfe/trunk/lib/Serialization/AS<wbr>TReader.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=302966&r1=302965&r2=302966&view=diff" rel="noreferrer" class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382cremed" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/lib/Serializat<wbr>ion/ASTReader.cpp?rev=302966&r<wbr>1=302965&r2=302966&view=diff</a><br>
> ==============================<wbr>==============================<wbr>==================<br>
> --- cfe/trunk/lib/Serialization/AS<wbr>TReader.cpp (original)<br>
> +++ cfe/trunk/lib/Serialization/AS<wbr>TReader.cpp Fri May 12 18:40:52 2017<br>
> @@ -1534,9 +1534,8 @@ MacroInfo *ASTReader::ReadMacroRecord(Mo<br>
>         return Macro;<br>
><br>
>       unsigned NextIndex = 1; // Skip identifier ID.<br>
> -      SubmoduleID SubModID = getGlobalSubmoduleID(F, Record[NextIndex++]);<br>
>       SourceLocation Loc = ReadSourceLocation(F, Record, NextIndex);<br>
> -      MacroInfo *MI = PP.AllocateDeserializedMacroIn<wbr>fo(Loc, SubModID);<br>
> +      MacroInfo *MI = PP.AllocateMacroInfo(Loc);<br>
>       MI->setDefinitionEndLoc(ReadS<wbr>ourceLocation(F, Record, NextIndex));<br>
>       MI->setIsUsed(Record[NextInde<wbr>x++]);<br>
>       MI->setUsedForHeaderGuard(Rec<wbr>ord[NextIndex++]);<br>
><br>
> Modified: cfe/trunk/lib/Serialization/AS<wbr>TWriter.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriter.cpp?rev=302966&r1=302965&r2=302966&view=diff" rel="noreferrer" class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382cremed" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/lib/Serializat<wbr>ion/ASTWriter.cpp?rev=302966&r<wbr>1=302965&r2=302966&view=diff</a><br>
> ==============================<wbr>==============================<wbr>==================<br>
> --- cfe/trunk/lib/Serialization/AS<wbr>TWriter.cpp (original)<br>
> +++ cfe/trunk/lib/Serialization/AS<wbr>TWriter.cpp Fri May 12 18:40:52 2017<br>
> @@ -2413,7 +2413,6 @@ void ASTWriter::WritePreprocessor(c<wbr>onst<br>
>     }<br>
><br>
>     AddIdentifierRef(Name, Record);<br>
> -    Record.push_back(inferSubmodul<wbr>eIDFromLocation(MI->getDefinit<wbr>ionLoc()));<br>
>     AddSourceLocation(MI->getDefi<wbr>nitionLoc(), Record);<br>
>     AddSourceLocation(MI->getDefi<wbr>nitionEndLoc(), Record);<br>
>     Record.push_back(MI->isUsed()<wbr>);<br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@lists.llvm.org" class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382cremed" target="_blank">cfe-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382cremed" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
<br>
______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382cremed" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382cremed" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</div></div></blockquote></div><br></div></div>
</div></blockquote></div><br></div>______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382cremed" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" class="m_-4556210224183668740m_3415543219902628744m_3446541173111017784m_2910142016898927029m_1832434050385828210m_-6488573295373876382cremed" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</blockquote></div></div></div>
</blockquote></div><br></div>
</blockquote></div>
</div></div></blockquote></div><br></div>
</div></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div></div></div></div>
</blockquote></div><br></div>