LILAC
Language to language Interop LAyer Compiler
Loading...
Searching...
No Matches
exportattr.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2024 Yeong-won Seo
3 *
4 * This file is part of LILAC.
5 *
6 * LILAC is free software: you can redistribute it and/or modify it under
7 * the terms of the GNU General Public License as published by the Free
8 * Software Foundation, either version 3, or (at your option) any later
9 * version.
10 *
11 * LILAC is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#pragma once
21
22#include "pch.h"
23
24namespace lilac::cxx
25{
34 class ExportAttrInfo final : public clang::ParsedAttrInfo
35 {
36 public:
37 static constexpr std::string AttrMangling = "__lilac_export";
38
39 /************************************************************************
40 * derived from clang::ParsedAttrInfo *
41 ************************************************************************/
43
45 clang::Sema& sema,
46 const clang::ParsedAttr& attr,
47 const clang::Decl* decl) const override;
48
49 AttrHandling handleDeclAttribute(
50 clang::Sema& sema,
51 clang::Decl* decl,
52 const clang::ParsedAttr& attr) const override;
53
54 [[nodiscard]]
55 bool acceptsLangOpts(
56 const clang::LangOptions& LO) const override;
57 };
58}
A plugin making clang accepts attributes from LILAC.
Definition exportattr.h:35
bool diagAppertainsToDecl(clang::Sema &sema, const clang::ParsedAttr &attr, const clang::Decl *decl) const override
bool acceptsLangOpts(const clang::LangOptions &LO) const override
AttrHandling handleDeclAttribute(clang::Sema &sema, clang::Decl *decl, const clang::ParsedAttr &attr) const override
static constexpr std::string AttrMangling
Definition exportattr.h:37