From c2d6540aeb6729afe11498e746a10fde0a9bc7d0 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 4 May 2015 19:58:00 +0000 Subject: [PATCH] [modules] Don't bother registering loaded macros if there are none. 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 0dd9d2e460..c4b4aec24a 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -1829,7 +1829,8 @@ void ASTReader::resolvePendingMacro(IdentifierInfo *II, Earliest = MD; } - PP.setLoadedMacroDirective(II, Latest); + if (Latest) + PP.setLoadedMacroDirective(II, Latest); } ASTReader::InputFileInfo -- 2.50.1