]> granicus.if.org Git - clang/commitdiff
[modules] Don't bother registering loaded macros if there are none.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 4 May 2015 19:58:00 +0000 (19:58 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 4 May 2015 19:58:00 +0000 (19:58 +0000)
We don't yet have a reduced testcase for this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236454 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Serialization/ASTReader.cpp

index 0dd9d2e460eda9eb72b2693a289869d7f9a6c123..c4b4aec24a04858d3d0750ac2e62dc9f27dc26f7 100644 (file)
@@ -1829,7 +1829,8 @@ void ASTReader::resolvePendingMacro(IdentifierInfo *II,
     Earliest = MD;
   }
 
-  PP.setLoadedMacroDirective(II, Latest);
+  if (Latest)
+    PP.setLoadedMacroDirective(II, Latest);
 }
 
 ASTReader::InputFileInfo