-
Notifications
You must be signed in to change notification settings - Fork 0
/
GatherCompilers.h
37 lines (29 loc) · 953 Bytes
/
GatherCompilers.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
* Copyright (c) 2020-2021 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef GATHERCOMPILERS_H
#define GATHERCOMPILERS_H
#include "RteModel.h"
struct compiler_s {
std::string tcompiler;
std::string toptions;
};
class GatherCompilersVisitor : public RteVisitor
{
public:
GatherCompilersVisitor();
~GatherCompilersVisitor();
virtual VISIT_RESULT Visit(RteItem* item);
const std::map<std::string, compiler_s>& GetCompilerList() { return m_compilerMap; };
static std::string GetCompilerName(const compiler_s& compiler);
private:
bool AddCompiler(RteCondition* cond);
bool FilterConditions(const std::string& filter, RteCondition* cond);
std::map<std::string, std::string> EMPTY_MAP;
std::map<std::string, compiler_s> m_compilerMap;
RteModel m_filteredModel; // needed to test conditions
RteTarget m_target; // for expression evaluation
};
#endif //GATHERCOMPILERS_H