]> granicus.if.org Git - clang/commitdiff
[Driver] Handle default case in refactored addOpenMPRuntime
authorPirama Arumuga Nainar <pirama@google.com>
Mon, 9 Sep 2019 19:52:39 +0000 (19:52 +0000)
committerPirama Arumuga Nainar <pirama@google.com>
Mon, 9 Sep 2019 19:52:39 +0000 (19:52 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@371444 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains/CommonArgs.cpp

index e07b05248723c9e06fabfbe4c995a2cc40215958..ddf87a41838e49bf5e0b7f2d02aae7f933a9dc96 100644 (file)
@@ -525,6 +525,8 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC,
   case Driver::OMPRT_IOMP5:
     CmdArgs.push_back("-liomp5");
     break;
+  case Driver::OMPRT_Unknown:
+    break;
   }
 
   if (ForceStaticHostRuntime)