mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
Add llvm::triple constructor from arch, vendor, os strings, and recognize
DragonFly OS type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72242 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -44,6 +44,7 @@ const char *Triple::getOSTypeName(OSType Kind) {
|
||||
case UnknownOS: return "unknown";
|
||||
|
||||
case Darwin: return "darwin";
|
||||
case DragonFly: return "dragonfly";
|
||||
case FreeBSD: return "freebsd";
|
||||
case Linux: return "linux";
|
||||
}
|
||||
@@ -80,6 +81,8 @@ void Triple::Parse() const {
|
||||
std::string OSName = getOSName();
|
||||
if (memcmp(&OSName[0], "darwin", 6) == 0)
|
||||
OS = Darwin;
|
||||
else if (memcmp(&OSName[0], "dragonfly", 9) == 0)
|
||||
OS = DragonFly;
|
||||
else if (memcmp(&OSName[0], "freebsd", 7) == 0)
|
||||
OS = FreeBSD;
|
||||
else if (memcmp(&OSName[0], "linux", 5) == 0)
|
||||
|
||||
Reference in New Issue
Block a user