summaryrefslogtreecommitdiff
path: root/include/clang/Frontend/FrontendOptions.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-10-23 17:52:09 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-10-23 17:52:09 +0000
commit519fc96c475680de2cc49e7811dbbfadb912cbcc (patch)
tree310ca684459b7e9ae13c9a3b9abf308b3a634afe /include/clang/Frontend/FrontendOptions.h
parent2298981669bf3bd63335a4be179bc0f96823a8f4 (diff)
Notes
Diffstat (limited to 'include/clang/Frontend/FrontendOptions.h')
-rw-r--r--include/clang/Frontend/FrontendOptions.h51
1 files changed, 16 insertions, 35 deletions
diff --git a/include/clang/Frontend/FrontendOptions.h b/include/clang/Frontend/FrontendOptions.h
index a0acb1f066f2c..09d83adf579b8 100644
--- a/include/clang/Frontend/FrontendOptions.h
+++ b/include/clang/Frontend/FrontendOptions.h
@@ -10,15 +10,16 @@
#define LLVM_CLANG_FRONTEND_FRONTENDOPTIONS_H
#include "clang/AST/ASTDumperUtils.h"
+#include "clang/Basic/LangStandard.h"
#include "clang/Frontend/CommandLineSourceLoc.h"
-#include "clang/Serialization/ModuleFileExtension.h"
#include "clang/Sema/CodeCompleteOptions.h"
+#include "clang/Serialization/ModuleFileExtension.h"
#include "llvm/ADT/StringRef.h"
#include <cassert>
#include <memory>
#include <string>
-#include <vector>
#include <unordered_map>
+#include <vector>
namespace llvm {
@@ -89,8 +90,7 @@ enum ActionKind {
GeneratePCH,
/// Generate Interface Stub Files.
- GenerateInterfaceYAMLExpV1,
- GenerateInterfaceTBEExpV1,
+ GenerateInterfaceIfsExpV1,
/// Only execute frontend initialization.
InitOnly,
@@ -143,35 +143,11 @@ enum ActionKind {
/// The kind of a file that we've been handed as an input.
class InputKind {
private:
- unsigned Lang : 4;
+ Language Lang;
unsigned Fmt : 3;
unsigned Preprocessed : 1;
public:
- /// The language for the input, used to select and validate the language
- /// standard and possible actions.
- enum Language {
- Unknown,
-
- /// Assembly: we accept this only so that we can preprocess it.
- Asm,
-
- /// LLVM IR: we accept this so that we can run the optimizer on it,
- /// and compile it to assembly or object code.
- LLVM_IR,
-
- ///@{ Languages that the frontend can parse and compile.
- C,
- CXX,
- ObjC,
- ObjCXX,
- OpenCL,
- CUDA,
- RenderScript,
- HIP,
- ///@}
- };
-
/// The input file format.
enum Format {
Source,
@@ -179,7 +155,7 @@ public:
Precompiled
};
- constexpr InputKind(Language L = Unknown, Format F = Source,
+ constexpr InputKind(Language L = Language::Unknown, Format F = Source,
bool PP = false)
: Lang(L), Fmt(F), Preprocessed(PP) {}
@@ -188,10 +164,12 @@ public:
bool isPreprocessed() const { return Preprocessed; }
/// Is the input kind fully-unknown?
- bool isUnknown() const { return Lang == Unknown && Fmt == Source; }
+ bool isUnknown() const { return Lang == Language::Unknown && Fmt == Source; }
/// Is the language of the input some dialect of Objective-C?
- bool isObjectiveC() const { return Lang == ObjC || Lang == ObjCXX; }
+ bool isObjectiveC() const {
+ return Lang == Language::ObjC || Lang == Language::ObjCXX;
+ }
InputKind getPreprocessed() const {
return InputKind(getLanguage(), getFormat(), true);
@@ -451,6 +429,9 @@ public:
/// Filename to write statistics to.
std::string StatsFile;
+ /// Minimum time granularity (in microseconds) traced by time profiler.
+ unsigned TimeTraceGranularity;
+
public:
FrontendOptions()
: DisableFree(false), RelocatablePCH(false), ShowHelp(false),
@@ -461,12 +442,12 @@ public:
UseGlobalModuleIndex(true), GenerateGlobalModuleIndex(true),
ASTDumpDecls(false), ASTDumpLookups(false),
BuildingImplicitModule(false), ModulesEmbedAllFiles(false),
- IncludeTimestamps(true) {}
+ IncludeTimestamps(true), TimeTraceGranularity(500) {}
/// getInputKindForExtension - Return the appropriate input kind for a file
- /// extension. For example, "c" would return InputKind::C.
+ /// extension. For example, "c" would return Language::C.
///
- /// \return The input kind for the extension, or InputKind::Unknown if the
+ /// \return The input kind for the extension, or Language::Unknown if the
/// extension is not recognized.
static InputKind getInputKindForExtension(StringRef Extension);
};