diff options
| author | Jan HrubĂ˝ <jhruby.web@gmail.com> | 2017-03-13 08:56:05 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-13 08:56:05 +0100 |
| commit | 665f4118f603c5858217ed7a2f2f824b18ff4fc5 (patch) | |
| tree | f0167041edf71e90f2331b5025f603392a8de67a /toolsrc/src/MachineType.cpp | |
| parent | 1bec0fcb73073b5b1719f454c368a63f1bff625e (diff) | |
| parent | 1c9873a0daf625f67474aaf3e163c592c27ecb65 (diff) | |
| download | vcpkg-665f4118f603c5858217ed7a2f2f824b18ff4fc5.tar.gz vcpkg-665f4118f603c5858217ed7a2f2f824b18ff4fc5.zip | |
Merge pull request #1 from Microsoft/master
pull
Diffstat (limited to 'toolsrc/src/MachineType.cpp')
| -rw-r--r-- | toolsrc/src/MachineType.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/toolsrc/src/MachineType.cpp b/toolsrc/src/MachineType.cpp new file mode 100644 index 000000000..81012234d --- /dev/null +++ b/toolsrc/src/MachineType.cpp @@ -0,0 +1,42 @@ +#include "pch.h" +#include "MachineType.h" +#include "vcpkg_Checks.h" + +namespace vcpkg +{ + MachineType getMachineType(const uint16_t value) + { + MachineType t = static_cast<MachineType>(value); + switch (t) + { + case MachineType::UNKNOWN: + case MachineType::AM33: + case MachineType::AMD64: + case MachineType::ARM: + case MachineType::ARM64: + case MachineType::ARMNT: + case MachineType::EBC: + case MachineType::I386: + case MachineType::IA64: + case MachineType::M32R: + case MachineType::MIPS16: + case MachineType::MIPSFPU: + case MachineType::MIPSFPU16: + case MachineType::POWERPC: + case MachineType::POWERPCFP: + case MachineType::R4000: + case MachineType::RISCV32: + case MachineType::RISCV64: + case MachineType::RISCV128: + case MachineType::SH3: + case MachineType::SH3DSP: + case MachineType::SH4: + case MachineType::SH5: + case MachineType::THUMB: + case MachineType::WCEMIPSV2: + return t; + default: + Checks::exit_with_message("Unknown machine type code 0x%x", value); + } + } +} |
