[cfe-commits] r134422 - /cfe/trunk/lib/Basic/Targets.cpp

Joerg Sonnenberger joerg at bec.de
Tue Jul 5 11:05:54 PDT 2011


Author: joerg
Date: Tue Jul  5 13:05:54 2011
New Revision: 134422

URL: http://llvm.org/viewvc/llvm-project?rev=134422&view=rev
Log:
Use OS-specific configuration for mips-netbsd and mips-freebsd.

Modified:
    cfe/trunk/lib/Basic/Targets.cpp

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=134422&r1=134421&r2=134422&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Tue Jul  5 13:05:54 2011
@@ -2837,13 +2837,20 @@
     return new MSP430TargetInfo(T);
 
   case llvm::Triple::mips:
-    if (os == llvm::Triple::Psp)
+    switch (os) {
+    case llvm::Triple::Psp:
       return new PSPTargetInfo<MipsTargetInfo>(T);
-    if (os == llvm::Triple::Linux)
+    case llvm::Triple::Linux:
       return new LinuxTargetInfo<MipsTargetInfo>(T);
-    if (os == llvm::Triple::RTEMS)
+    case llvm::Triple::RTEMS:
       return new RTEMSTargetInfo<MipsTargetInfo>(T);
-    return new MipsTargetInfo(T);
+    case llvm::Triple::FreeBSD:
+      return new NetBSDTargetInfo<MipsTargetInfo>(T);
+    case llvm::Triple::NetBSD:
+      return new NetBSDTargetInfo<MipsTargetInfo>(T);
+    default:
+      return new MipsTargetInfo(T);
+    }
 
   case llvm::Triple::mipsel:
     if (os == llvm::Triple::Psp)





More information about the cfe-commits mailing list