static StringRef guessLibraryShortName(StringRef Name, bool &isFramework,
StringRef &Suffix);
- static Triple::ArchType getArch(uint32_t CPUType);
+ static Triple::ArchType getArch(uint32_t CPUType, uint32_t CPUSubType);
static Triple getArchTriple(uint32_t CPUType, uint32_t CPUSubType,
const char **McpuDefault = nullptr,
const char **ArchFlag = nullptr);
return O.getHeader().cputype;
}
+static unsigned getCPUSubType(const MachOObjectFile &O) {
+ return O.getHeader().cpusubtype;
+}
+
static uint32_t
getPlainRelocationAddress(const MachO::any_relocation_info &RE) {
return RE.r_word0;
}
}
-Triple::ArchType MachOObjectFile::getArch(uint32_t CPUType) {
+Triple::ArchType MachOObjectFile::getArch(uint32_t CPUType, uint32_t CPUSubType) {
switch (CPUType) {
case MachO::CPU_TYPE_I386:
return Triple::x86;
}
Triple::ArchType MachOObjectFile::getArch() const {
- return getArch(getCPUType(*this));
+ return getArch(getCPUType(*this), getCPUSubType(*this));
}
Triple MachOObjectFile::getArchTriple(const char **McpuDefault) const {