================
@@ -28,6 +32,38 @@ namespace clang {
/// The information about the darwin SDK that was used during this compilation.
class DarwinSDKInfo {
public:
+ /// Information about the supported platforms in the SDK
+ struct SupportedPlatform {
+ public:
+ SupportedPlatform(llvm::Triple::VendorType Vendor, llvm::Triple::OSType OS,
+ llvm::Triple::EnvironmentType Environment,
+ llvm::Triple::ObjectFormatType ObjectFormat,
+ StringRef SystemPrefix)
+ : Vendor(Vendor), OS(OS), Environment(Environment),
+ ObjectFormat(ObjectFormat), SystemPrefix(SystemPrefix) {}
+
+ llvm::Triple::VendorType getVendor() const { return Vendor; }
+ llvm::Triple::OSType getOS() const { return OS; }
+ llvm::Triple::EnvironmentType getEnvironment() const { return Environment;
}
+ llvm::Triple::ObjectFormatType getObjectFormat() const {
+ return ObjectFormat;
+ }
+ StringRef getSystemPrefix() const { return SystemPrefix; }
+
+ bool operator==(const llvm::Triple &RHS) const {
+ return (Vendor == RHS.getVendor()) && (OS == RHS.getOS()) &&
+ (Environment == RHS.getEnvironment()) &&
+ (ObjectFormat == RHS.getObjectFormat());
+ }
+
+ private:
+ llvm::Triple::VendorType Vendor;
+ llvm::Triple::OSType OS;
+ llvm::Triple::EnvironmentType Environment;
+ llvm::Triple::ObjectFormatType ObjectFormat;
+ std::string SystemPrefix;
+ };
+
/// A value that describes two os-environment pairs that can be used as a key
/// to the version map in the SDK.
struct OSEnvPair {
----------------
cyndyishida wrote:
Not necessary for this PR, but it seems like this type can be defined from
"SupportedPlatform", it would be good to unify here.
https://github.com/llvm/llvm-project/pull/171970
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits