Avoid errors on header guards using #if defined(NAME).

llvm-svn: 188306
This commit is contained in:
John Thompson 2013-08-13 18:11:36 +00:00
parent c0a5cddfa8
commit c8d710cc82
1 changed files with 2 additions and 0 deletions

View File

@ -962,6 +962,8 @@ public:
llvm::StringRef MacroUnexpanded, llvm::StringRef MacroUnexpanded,
llvm::StringRef MacroExpanded, llvm::StringRef MacroExpanded,
InclusionPathHandle InclusionPathHandle) { InclusionPathHandle InclusionPathHandle) {
if (InNestedHeader)
return;
StringHandle MacroName = addString(II->getName()); StringHandle MacroName = addString(II->getName());
PPItemKey InstanceKey(PP, MacroName, H, InstanceLoc); PPItemKey InstanceKey(PP, MacroName, H, InstanceLoc);
PPItemKey DefinitionKey(PP, MacroName, H, DefinitionLoc); PPItemKey DefinitionKey(PP, MacroName, H, DefinitionLoc);