Francis Visoiu Mistrih | 5a05cc0 | 2019-03-19 21:11:07 +0000 | [diff] [blame] | 1 | //===-- RemarkParserImpl.h - Implementation details -------------*- C++/-*-===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | // |
| 9 | // This file provides implementation details for the remark parser. |
| 10 | // |
| 11 | //===----------------------------------------------------------------------===// |
| 12 | |
| 13 | #ifndef LLVM_REMARKS_REMARK_PARSER_IMPL_H |
| 14 | #define LLVM_REMARKS_REMARK_PARSER_IMPL_H |
| 15 | |
| 16 | namespace llvm { |
| 17 | namespace remarks { |
| 18 | /// This is used as a base for any parser implementation. |
| 19 | struct ParserImpl { |
| 20 | enum class Kind { YAML }; |
| 21 | |
Jordan Rupprecht | becd797 | 2019-03-20 17:44:24 +0000 | [diff] [blame] | 22 | explicit ParserImpl(Kind TheParserKind) : ParserKind(TheParserKind) {} |
| 23 | // Virtual destructor prevents mismatched deletes |
| 24 | virtual ~ParserImpl() {} |
| 25 | |
Francis Visoiu Mistrih | 5a05cc0 | 2019-03-19 21:11:07 +0000 | [diff] [blame] | 26 | // The parser kind. This is used as a tag to safely cast between |
| 27 | // implementations. |
Douglas Yung | 16a8c54 | 2019-03-20 01:52:40 +0000 | [diff] [blame] | 28 | Kind ParserKind; |
Francis Visoiu Mistrih | 5a05cc0 | 2019-03-19 21:11:07 +0000 | [diff] [blame] | 29 | }; |
| 30 | } // end namespace remarks |
| 31 | } // end namespace llvm |
| 32 | |
| 33 | #endif /* LLVM_REMARKS_REMARK_PARSER_IMPL_H */ |