Loading...
cache_builder/BuilderOptions.cpp dyld-1340 dyld-1241.17
--- dyld/dyld-1340/cache_builder/BuilderOptions.cpp
+++ dyld/dyld-1241.17/cache_builder/BuilderOptions.cpp
@@ -23,60 +23,52 @@
 */
 
 #include "BuilderOptions.h"
-#include "GradedArchitectures.h"
-#include "Platform.h"
 
 using namespace cache_builder;
-
-using mach_o::GradedArchitectures;
-using mach_o::Platform;
+using dyld3::GradedArchs;
 
 //
 // MARK: --- cache_builder::Options methods ---
 //
 
-BuilderOptions::BuilderOptions(std::string_view archName, Platform platform,
+BuilderOptions::BuilderOptions(std::string_view archName, dyld3::Platform platform,
                                bool dylibsRemovedFromDisk, bool isLocallyBuiltCache,
-                               CacheKind kind, bool forceDevelopmentSubCacheSuffix,
-                               std::string_view updateName, std::string_view deviceName)
-    : arch(mach_o::Architecture::byName(archName))
-    , gradedArchs(GradedArchitectures::forName(archName.data()))
+                               CacheKind kind, bool forceDevelopmentSubCacheSuffix)
+    : archs(GradedArchs::forName(archName.data()))
     , platform(platform)
     , dylibsRemovedFromDisk(dylibsRemovedFromDisk)
     , isLocallyBuiltCache(isLocallyBuiltCache)
     , forceDevelopmentSubCacheSuffix(forceDevelopmentSubCacheSuffix)
     , kind(kind)
-    , updateName(updateName)
-    , deviceName(deviceName)
 {
 }
 
 bool BuilderOptions::isSimulator() const
 {
-    return this->platform.isSimulator();
+    return dyld3::MachOFile::isSimulatorPlatform(this->platform);
 }
 
 bool BuilderOptions::isExclaveKit() const
 {
-    return this->platform.isExclaveKit();
+    return dyld3::MachOFile::isExclaveKitPlatform(this->platform);
 }
 
 //
 // MARK: --- cache_builder::InputFile methods ---
 //
 
-void InputFile::addError(error::Error&& err)
+void InputFile::setError(error::Error&& err)
 {
-    // This is a good place to breakpoint and catch if a specific dylib has an error
-    this->errors.push_back(std::move(err));
+    // This is a good place to catch if a specific dylib has an error
+    this->error = std::move(err);
 }
 
-std::span<const error::Error> InputFile::getErrors() const
+const error::Error& InputFile::getError() const
 {
-    return this->errors;
+    return this->error;
 }
 
 bool InputFile::hasError() const
 {
-    return !this->errors.empty();
+    return this->error.hasError();
 }