mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
Triple: Make setEnvironment not override the object format
Discovered by Halide users who had C++ code like this: Triple.setArch(Triple::x86); Triple.setOS(Triple::Windows); Triple.setObjectFormat(Triple::ELF); Triple.setEnvironment(Triple::MSVC); This would produce the stringified triple of x86-windows-msvc, instead of the x86-windows-msvc-elf string needed to run MCJIT. With this change, they retain the -elf suffix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229160 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fa1b3ba1f0
commit
86b5c3a844
@ -816,7 +816,11 @@ void Triple::setOS(OSType Kind) {
|
||||
}
|
||||
|
||||
void Triple::setEnvironment(EnvironmentType Kind) {
|
||||
setEnvironmentName(getEnvironmentTypeName(Kind));
|
||||
if (ObjectFormat == getDefaultFormat(*this))
|
||||
return setEnvironmentName(getEnvironmentTypeName(Kind));
|
||||
|
||||
setEnvironmentName((getEnvironmentTypeName(Kind) + Twine("-") +
|
||||
getObjectFormatTypeName(ObjectFormat)).str());
|
||||
}
|
||||
|
||||
void Triple::setObjectFormat(ObjectFormatType Kind) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user