|
14 | 14 | #include "clang/Basic/PragmaKinds.h"
|
15 | 15 | #include "clang/Basic/TargetInfo.h"
|
16 | 16 | #include "clang/Lex/Preprocessor.h"
|
17 |
| -#include "clang/Lex/PreprocessorOptions.h" |
18 | 17 | #include "clang/Lex/Token.h"
|
19 | 18 | #include "clang/Parse/LoopHint.h"
|
20 | 19 | #include "clang/Parse/ParseDiagnostic.h"
|
@@ -412,19 +411,6 @@ struct PragmaRISCVHandler : public PragmaHandler {
|
412 | 411 | Sema &Actions;
|
413 | 412 | };
|
414 | 413 |
|
415 |
| -struct PragmaMCFuncHandler : public PragmaHandler { |
416 |
| - PragmaMCFuncHandler(bool ReportError) |
417 |
| - : PragmaHandler("mc_func"), ReportError(ReportError) {} |
418 |
| - void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, |
419 |
| - Token &Tok) override { |
420 |
| - if (ReportError) |
421 |
| - PP.Diag(Tok, diag::err_pragma_mc_func_not_supported); |
422 |
| - } |
423 |
| - |
424 |
| -private: |
425 |
| - bool ReportError = false; |
426 |
| -}; |
427 |
| - |
428 | 414 | void markAsReinjectedForRelexing(llvm::MutableArrayRef<clang::Token> Toks) {
|
429 | 415 | for (auto &T : Toks)
|
430 | 416 | T.setFlag(clang::Token::IsReinjected);
|
@@ -582,12 +568,6 @@ void Parser::initializePragmaHandlers() {
|
582 | 568 | RISCVPragmaHandler = std::make_unique<PragmaRISCVHandler>(Actions);
|
583 | 569 | PP.AddPragmaHandler("clang", RISCVPragmaHandler.get());
|
584 | 570 | }
|
585 |
| - |
586 |
| - if (getTargetInfo().getTriple().isOSAIX()) { |
587 |
| - MCFuncPragmaHandler = std::make_unique<PragmaMCFuncHandler>( |
588 |
| - PP.getPreprocessorOpts().ErrorOnPragmaMcfuncOnAIX); |
589 |
| - PP.AddPragmaHandler(MCFuncPragmaHandler.get()); |
590 |
| - } |
591 | 571 | }
|
592 | 572 |
|
593 | 573 | void Parser::resetPragmaHandlers() {
|
@@ -722,11 +702,6 @@ void Parser::resetPragmaHandlers() {
|
722 | 702 | PP.RemovePragmaHandler("clang", RISCVPragmaHandler.get());
|
723 | 703 | RISCVPragmaHandler.reset();
|
724 | 704 | }
|
725 |
| - |
726 |
| - if (getTargetInfo().getTriple().isOSAIX()) { |
727 |
| - PP.RemovePragmaHandler(MCFuncPragmaHandler.get()); |
728 |
| - MCFuncPragmaHandler.reset(); |
729 |
| - } |
730 | 705 | }
|
731 | 706 |
|
732 | 707 | /// Handle the annotation token produced for #pragma unused(...)
|
|
0 commit comments