clang: lib/Driver/ToolChains/LazyDetector.h Source File (original) (raw)
Go to the documentation of this file.
1
2
3
4
5
6
7
8
9#ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_LAZYDETECTOR_H
10#define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_LAZYDETECTOR_H
11
14#include
15
17
18
19
20
23 llvm::Triple Triple;
24 const llvm::opt::ArgList &Args;
25
26 std::optional Detector;
27
28public:
30 const llvm::opt::ArgList &Args)
31 : D(D), Triple(Triple), Args(Args) {}
33 if (!Detector)
34 Detector.emplace(D, Triple, Args);
35 return &*Detector;
36 }
38 return const_cast<T const *>(
39 const_cast<LazyDetector &>(*this).operator->());
40 }
41};
42
43}
44
45#endif
Simple wrapper for toolchain detector with costly initialization.
LazyDetector(const driver::Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args)
const T * operator->() const
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
The JSON file list parser is used to communicate input to InstallAPI.
const FunctionProtoType * T