clang 24.0.0git
SSAFOptions.h
Go to the documentation of this file.
1//===- SSAFOptions.h --------------------------------------------*- 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#ifndef LLVM_CLANG_FRONTEND_SSAFOPTIONS_H
10#define LLVM_CLANG_FRONTEND_SSAFOPTIONS_H
11
12#include "llvm/Support/Compiler.h"
13#include <string>
14#include <vector>
15
16namespace clang::ssaf {
17
19public:
20 /// List of SSAF extractors to enable.
21 /// Controlled by: --ssaf-extract-summaries
22 std::vector<std::string> ExtractSummaries;
23
24 /// The TU summary output file with the file extension representing the
25 /// serialization format.
26 /// Controlled by: --ssaf-tu-summary-file
27 std::string TUSummaryFile;
28
29 /// Stable identifier used as the name of the `CompilationUnit`
30 /// `BuildNamespace` of every produced TU summary.
31 /// Controlled by: --ssaf-compilation-unit-id
32 std::string CompilationUnitId;
33
34 /// Name of the SSAF source transformation to run. Exactly one transformation
35 /// per invocation; non-empty implies the source-transformation pipeline is
36 /// active.
37 /// Controlled by: --ssaf-source-transformation
39
40 /// Path of the WPASuite input consumed by the source transformation. The
41 /// extension selects which serialization format reads it.
42 /// Controlled by: --ssaf-global-scope-analysis-result
44
45 /// Stable identifier of the link unit that this compilation unit was
46 /// linked into. Controlled by: --ssaf-link-unit-id
47 std::string LinkUnitId;
48
49 /// Path of the source-edit output file produced by the source
50 /// transformation.
51 /// Controlled by: --ssaf-src-edit-file
52 std::string SrcEditFile;
53
54 /// Path of the transformation-report output file produced by the source
55 /// transformation.
56 /// Controlled by: --ssaf-transformation-report-file
58
59 /// Show the list of available SSAF summary extractors and exit.
60 /// Controlled by: --ssaf-list-extractors
61 LLVM_PREFERRED_TYPE(bool)
63
64 /// Show the list of available SSAF serialization formats and exit.
65 /// Controlled by: --ssaf-list-formats
66 LLVM_PREFERRED_TYPE(bool)
67 unsigned ShowFormats : 1;
68
69 /// Include block-scope (function-local) declarations in extracted SSAF
70 /// summaries. Defaults to false to preserve the original behavior.
71 /// Controlled by: --ssaf-include-local-entities
72 LLVM_PREFERRED_TYPE(bool)
74
75 /// Extract from system-header declarations during SSAF contributor
76 /// enumeration. Defaults to true to preserve the original behavior.
77 /// Controlled by: --ssaf-no-extract-from-system-headers
78 LLVM_PREFERRED_TYPE(bool)
80
82 ShowExtractors = false;
83 ShowFormats = false;
86 };
87};
88
89} // namespace clang::ssaf
90
91#endif // LLVM_CLANG_FRONTEND_SSAFOPTIONS_H
unsigned ExtractFromSystemHeaders
Extract from system-header declarations during SSAF contributor enumeration.
Definition SSAFOptions.h:79
std::string SrcEditFile
Path of the source-edit output file produced by the source transformation.
Definition SSAFOptions.h:52
std::string TransformationReportFile
Path of the transformation-report output file produced by the source transformation.
Definition SSAFOptions.h:57
std::string CompilationUnitId
Stable identifier used as the name of the CompilationUnit BuildNamespace of every produced TU summary...
Definition SSAFOptions.h:32
std::string SourceTransformation
Name of the SSAF source transformation to run.
Definition SSAFOptions.h:38
unsigned ShowExtractors
Show the list of available SSAF summary extractors and exit.
Definition SSAFOptions.h:62
unsigned IncludeLocalEntities
Include block-scope (function-local) declarations in extracted SSAF summaries.
Definition SSAFOptions.h:73
std::string GlobalScopeAnalysisResult
Path of the WPASuite input consumed by the source transformation.
Definition SSAFOptions.h:43
std::vector< std::string > ExtractSummaries
List of SSAF extractors to enable.
Definition SSAFOptions.h:22
std::string LinkUnitId
Stable identifier of the link unit that this compilation unit was linked into.
Definition SSAFOptions.h:47
std::string TUSummaryFile
The TU summary output file with the file extension representing the serialization format.
Definition SSAFOptions.h:27
unsigned ShowFormats
Show the list of available SSAF serialization formats and exit.
Definition SSAFOptions.h:67