Set the correct triple when creating an ArchSpec for Windows.
authorZachary Turner <zturner@google.com>
Fri, 16 Sep 2016 19:09:19 +0000 (19:09 +0000)
committerZachary Turner <zturner@google.com>
Fri, 16 Sep 2016 19:09:19 +0000 (19:09 +0000)
Patch by Walter Erquinigo
Differential Revision: https://reviews.llvm.org/D24283

llvm-svn: 281765

lldb/source/Core/ArchSpec.cpp

index 0719014..4959d6c 100644 (file)
@@ -1030,6 +1030,9 @@ bool ArchSpec::SetArchitecture(ArchitectureType arch_type, uint32_t cpu,
             m_triple.setOS(llvm::Triple::OSType::Solaris);
             break;
           }
+        } else if (arch_type == eArchTypeCOFF && os == llvm::Triple::Win32) {
+          m_triple.setVendor(llvm::Triple::PC);
+          m_triple.setOS(llvm::Triple::Win32);
         } else {
           m_triple.setVendor(llvm::Triple::UnknownVendor);
           m_triple.setOS(llvm::Triple::UnknownOS);