File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 2121
2222namespace clang ::installapi {
2323enum class HeaderType {
24+ // / Unset or unknown type.
25+ Unknown,
2426 // / Represents declarations accessible to all clients.
2527 Public,
2628 // / Represents declarations accessible to a disclosed set of clients.
@@ -41,6 +43,7 @@ class HeaderFile {
4143 std::optional<clang::Language> Language;
4244
4345public:
46+ HeaderFile () = delete ;
4447 HeaderFile (StringRef FullPath, HeaderType Type,
4548 StringRef IncludeName = StringRef(),
4649 std::optional<clang::Language> Language = std::nullopt )
Original file line number Diff line number Diff line change @@ -22,14 +22,7 @@ namespace installapi {
2222
2323bool Options::processDriverOptions (InputArgList &Args) {
2424 // 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));
3326
3427 // Handle output.
3528 SmallString<PATH_MAX> OutputPath;
@@ -61,8 +54,9 @@ bool Options::processDriverOptions(InputArgList &Args) {
6154
6255 // Capture target triples first.
6356 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 ());
6660 Target TAPITarget = Target (TargetTriple);
6761 if ((TAPITarget.Arch == AK_unknown) ||
6862 (TAPITarget.Platform == PLATFORM_UNKNOWN)) {
You can’t perform that action at this time.
0 commit comments