r371444 - [Driver] Handle default case in refactored addOpenMPRuntime

Pirama Arumuga Nainar via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 9 12:52:39 PDT 2019


Author: pirama
Date: Mon Sep  9 12:52:39 2019
New Revision: 371444

URL: http://llvm.org/viewvc/llvm-project?rev=371444&view=rev
Log:
[Driver] Handle default case in refactored addOpenMPRuntime

Summary:
Appease failed builds (due to -Werror and -Wswitch) where OMPRT_Unknown
is not handled in the switch statement (even though it's handled by the
early exit).

This fixes -Wswitch triggered by r371442.

Reviewers: srhines, danalbert, jdoerfert

Subscribers: guansong, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D67364

Modified:
    cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp

Modified: cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp?rev=371444&r1=371443&r2=371444&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp Mon Sep  9 12:52:39 2019
@@ -525,6 +525,8 @@ bool tools::addOpenMPRuntime(ArgStringLi
   case Driver::OMPRT_IOMP5:
     CmdArgs.push_back("-liomp5");
     break;
+  case Driver::OMPRT_Unknown:
+    break;
   }
 
   if (ForceStaticHostRuntime)




More information about the cfe-commits mailing list