summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-03-18 22:19:16 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-03-18 22:19:16 +0000
commit242548906d0669984661f993373606e98c581cf2 (patch)
tree313c19d114f83e3107aeefbd0c65865cd7e97d5b /llvm/lib/Support
parent5ec5c9cafef2d1fc147ae107d20f8c3b2d296a94 (diff)
downloadbcm5719-llvm-242548906d0669984661f993373606e98c581cf2.tar.gz
bcm5719-llvm-242548906d0669984661f993373606e98c581cf2.zip
Teach getDefaultFormat that we only support ELF on some architectures.
This should bring the windows bots back. It is a bit ugly, but it is better than what we had before: The triple would say that the object format was COFF, but llc/llvm-mc would produce an ELF. llvm-svn: 232683
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/Triple.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp
index d74173a6621..4b4ee283e64 100644
--- a/llvm/lib/Support/Triple.cpp
+++ b/llvm/lib/Support/Triple.cpp
@@ -439,6 +439,23 @@ static const char *getObjectFormatTypeName(Triple::ObjectFormatType Kind) {
}
static Triple::ObjectFormatType getDefaultFormat(const Triple &T) {
+ switch (T.getArch()) {
+ default:
+ break;
+ case Triple::hexagon:
+ case Triple::mips:
+ case Triple::mipsel:
+ case Triple::mips64:
+ case Triple::mips64el:
+ case Triple::r600:
+ case Triple::amdgcn:
+ case Triple::sparc:
+ case Triple::sparcv9:
+ case Triple::systemz:
+ case Triple::xcore:
+ return Triple::ELF;
+ }
+
if (T.isOSDarwin())
return Triple::MachO;
else if (T.isOSWindows())
OpenPOWER on IntegriCloud