r277064 - [CUDA] Unswitch enumerators in the selection of the offloading tool chain.

Samuel Antao via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 28 15:42:42 PDT 2016


Author: sfantao
Date: Thu Jul 28 17:42:42 2016
New Revision: 277064

URL: http://llvm.org/viewvc/llvm-project?rev=277064&view=rev
Log:
[CUDA] Unswitch enumerators in the selection of the offloading tool chain.

Modified:
    cfe/trunk/lib/Driver/Tools.cpp

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=277064&r1=277063&r2=277064&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Jul 28 17:42:42 2016
@@ -308,9 +308,9 @@ forAllAssociatedToolChains(Compilation &
   // Apply Work on all the offloading tool chains associated with the current
   // action.
   if (JA.isHostOffloading(Action::OFK_Cuda))
-    Work(*C.getSingleOffloadToolChain<Action::OFK_Host>());
-  else if (JA.isDeviceOffloading(Action::OFK_Cuda))
     Work(*C.getSingleOffloadToolChain<Action::OFK_Cuda>());
+  else if (JA.isDeviceOffloading(Action::OFK_Cuda))
+    Work(*C.getSingleOffloadToolChain<Action::OFK_Host>());
 
   //
   // TODO: Add support for other offloading programming models here.




More information about the cfe-commits mailing list