| 118 | } |
| 119 | |
| 120 | void InclusionDirective(SourceLocation hashLoc, |
| 121 | const Token& /*IncludeTok*/, |
| 122 | StringRef fileName, |
| 123 | bool isAngled, |
| 124 | CharSourceRange /*FilenameRange*/, |
| 125 | OptionalFileEntryRef /*file*/, |
| 126 | StringRef /*SearchPath*/, |
| 127 | StringRef /*RelativePath*/, |
| 128 | const Module* /*Imported*/, |
| 129 | bool /*ModuleImported*/, |
| 130 | SrcMgr::CharacteristicKind /*FileType*/) override |
| 131 | { |
| 132 | auto expansionLoc = mSm.getExpansionLoc(hashLoc); |
| 133 | |
| 134 | if(expansionLoc.isInvalid() or mSm.isInSystemHeader(expansionLoc)) { |
| 135 | return; |
| 136 | } |
| 137 | |
| 138 | // XXX: distinguish between include and import via the IncludeTok |
| 139 | if(isAngled) { |
| 140 | mIncludes.emplace_back(expansionLoc, StrCat("#include <"sv, fileName, ">\n"sv)); |
| 141 | |
| 142 | } else { |
| 143 | mIncludes.emplace_back(expansionLoc, StrCat("#include \""sv, fileName, "\"\n"sv)); |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | void MacroDefined(const Token& macroNameTok, const MacroDirective* md) override |
| 148 | { |