File tree 2 files changed +7
-10
lines changed
2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 21
21
22
22
namespace clang ::installapi {
23
23
enum class HeaderType {
24
+ // / Unset or unknown type.
25
+ Unknown,
24
26
// / Represents declarations accessible to all clients.
25
27
Public,
26
28
// / Represents declarations accessible to a disclosed set of clients.
@@ -41,6 +43,7 @@ class HeaderFile {
41
43
std::optional<clang::Language> Language;
42
44
43
45
public:
46
+ HeaderFile () = delete ;
44
47
HeaderFile (StringRef FullPath, HeaderType Type,
45
48
StringRef IncludeName = StringRef(),
46
49
std::optional<clang::Language> Language = std::nullopt)
Original file line number Diff line number Diff line change @@ -22,14 +22,7 @@ namespace installapi {
22
22
23
23
bool Options::processDriverOptions (InputArgList &Args) {
24
24
// Handle inputs.
25
- llvm::vfs::Status Stat;
26
- for (const auto &Path : Args.getAllArgValues (OPT_INPUT)) {
27
- if (FM->getNoncachedStatValue (Path, Stat) || !Stat.exists ()) {
28
- Diags->Report (clang::diag::err_drv_no_such_file) << Path;
29
- return false ;
30
- }
31
- DriverOpts.FileLists .push_back (std::move (Path));
32
- }
25
+ llvm::append_range (DriverOpts.FileLists , Args.getAllArgValues (OPT_INPUT));
33
26
34
27
// Handle output.
35
28
SmallString<PATH_MAX> OutputPath;
@@ -61,8 +54,9 @@ bool Options::processDriverOptions(InputArgList &Args) {
61
54
62
55
// Capture target triples first.
63
56
if (ArgTarget) {
64
- for (auto *Arg : Args.filtered (OPT_target)) {
65
- llvm::Triple TargetTriple (Arg->getValue ());
57
+ for (const Arg *A : Args.filtered (OPT_target)) {
58
+ A->claim ();
59
+ llvm::Triple TargetTriple (A->getValue ());
66
60
Target TAPITarget = Target (TargetTriple);
67
61
if ((TAPITarget.Arch == AK_unknown) ||
68
62
(TAPITarget.Platform == PLATFORM_UNKNOWN)) {
You can’t perform that action at this time.
0 commit comments