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 /// Path of the source-edit output file produced by the source
46 /// transformation.
47 /// Controlled by: --ssaf-src-edit-file
48 std::string SrcEditFile;
49
50 /// Path of the transformation-report output file produced by the source
51 /// transformation.
52 /// Controlled by: --ssaf-transformation-report-file
54
55 /// Show the list of available SSAF summary extractors and exit.
56 /// Controlled by: --ssaf-list-extractors
57 LLVM_PREFERRED_TYPE(bool)
59
60 /// Show the list of available SSAF serialization formats and exit.
61 /// Controlled by: --ssaf-list-formats
62 LLVM_PREFERRED_TYPE(bool)
63 unsigned ShowFormats : 1;
64
65 /// Include block-scope (function-local) declarations in extracted SSAF
66 /// summaries. Defaults to false to preserve the original behavior.
67 /// Controlled by: --ssaf-include-local-entities
68 LLVM_PREFERRED_TYPE(bool)
70
71 /// Extract from system-header declarations during SSAF contributor
72 /// enumeration. Defaults to true to preserve the original behavior.
73 /// Controlled by: --ssaf-no-extract-from-system-headers
74 LLVM_PREFERRED_TYPE(bool)
76
78 ShowExtractors = false;
79 ShowFormats = false;
82 };
83};
84
85} // namespace clang::ssaf
86
87#endif // LLVM_CLANG_FRONTEND_SSAFOPTIONS_H
unsigned ExtractFromSystemHeaders
Extract from system-header declarations during SSAF contributor enumeration.
Definition SSAFOptions.h:75
std::string SrcEditFile
Path of the source-edit output file produced by the source transformation.
Definition SSAFOptions.h:48
std::string TransformationReportFile
Path of the transformation-report output file produced by the source transformation.
Definition SSAFOptions.h:53
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:58
unsigned IncludeLocalEntities
Include block-scope (function-local) declarations in extracted SSAF summaries.
Definition SSAFOptions.h:69
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 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:63