diff options
author | Ed Maste <emaste@FreeBSD.org> | 2015-02-09 01:44:09 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2015-02-09 01:44:09 +0000 |
commit | 12bd4897ff0678fa663e09d78ebc22dd255ceb86 (patch) | |
tree | a8f4b3abea3e6937e60728991c736e6e3d322fc1 /source/Core/ArchSpec.cpp | |
parent | 205afe679855a4ce8149cdaa94d3f0868ce796dc (diff) |
Notes
Diffstat (limited to 'source/Core/ArchSpec.cpp')
-rw-r--r-- | source/Core/ArchSpec.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/Core/ArchSpec.cpp b/source/Core/ArchSpec.cpp index e7a5e489af192..015f76bffbb53 100644 --- a/source/Core/ArchSpec.cpp +++ b/source/Core/ArchSpec.cpp @@ -765,6 +765,19 @@ ArchSpec::SetTriple (const char *triple_cstr, Platform *platform) return IsValid(); } +void +ArchSpec::MergeFrom(const ArchSpec &other) +{ + if (GetTriple().getVendor() == llvm::Triple::UnknownVendor && !TripleVendorWasSpecified()) + GetTriple().setVendor(other.GetTriple().getVendor()); + if (GetTriple().getOS() == llvm::Triple::UnknownOS && !TripleOSWasSpecified()) + GetTriple().setOS(other.GetTriple().getOS()); + if (GetTriple().getArch() == llvm::Triple::UnknownArch) + GetTriple().setArch(other.GetTriple().getArch()); + if (GetTriple().getEnvironment() == llvm::Triple::UnknownEnvironment) + GetTriple().setEnvironment(other.GetTriple().getEnvironment()); +} + bool ArchSpec::SetArchitecture (ArchitectureType arch_type, uint32_t cpu, uint32_t sub) { |