@@ -213,8 +213,13 @@ void HipifyAction::InclusionDirective(clang::SourceLocation hash_loc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void HipifyAction::PragmaDirective(clang::SourceLocation Loc, clang::PragmaIntroducerKind Introducer) {
|
void HipifyAction::PragmaDirective(clang::SourceLocation Loc, clang::PragmaIntroducerKind Introducer) {
|
||||||
if (pragmaOnce) { return; }
|
if (pragmaOnce) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
clang::SourceManager& SM = getCompilerInstance().getSourceManager();
|
clang::SourceManager& SM = getCompilerInstance().getSourceManager();
|
||||||
|
if (!SM.isWrittenInMainFile(Loc)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
clang::Preprocessor& PP = getCompilerInstance().getPreprocessor();
|
clang::Preprocessor& PP = getCompilerInstance().getPreprocessor();
|
||||||
const clang::Token tok = PP.LookAhead(0);
|
const clang::Token tok = PP.LookAhead(0);
|
||||||
StringRef Text(SM.getCharacterData(tok.getLocation()), tok.getLength());
|
StringRef Text(SM.getCharacterData(tok.getLocation()), tok.getLength());
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户