From: Hans Wennborg Date: Mon, 2 Mar 2015 22:09:05 +0000 (+0000) Subject: clang-cl: Correctly ignore /openmp- (PR22748) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ab5cb55730ad27c9d711229d686aa0de994788dd;p=clang clang-cl: Correctly ignore /openmp- (PR22748) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231026 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/CLCompatOptions.td b/include/clang/Driver/CLCompatOptions.td index 80630fcefa..254093b175 100644 --- a/include/clang/Driver/CLCompatOptions.td +++ b/include/clang/Driver/CLCompatOptions.td @@ -225,6 +225,7 @@ def _SLASH_kernel_ : CLIgnoredFlag<"kernel-">; def _SLASH_nologo : CLIgnoredFlag<"nologo">; def _SLASH_Ob1 : CLIgnoredFlag<"Ob1">; def _SLASH_Ob2 : CLIgnoredFlag<"Ob2">; +def _SLASH_openmp_ : CLIgnoredFlag<"openmp-">; def _SLASH_RTC : CLIgnoredJoined<"RTC">; def _SLASH_sdl : CLIgnoredFlag<"sdl">; def _SLASH_sdl_ : CLIgnoredFlag<"sdl-">; diff --git a/test/Driver/cl-options.c b/test/Driver/cl-options.c index e7ace35545..2dc810d91e 100644 --- a/test/Driver/cl-options.c +++ b/test/Driver/cl-options.c @@ -183,8 +183,7 @@ // Wno: "-Wno-deprecated-declarations" // Ignored options. Check that we don't get "unused during compilation" errors. -// (/Zs is for syntax-only) -// RUN: %clang_cl /Zs \ +// RUN: %clang_cl /c \ // RUN: /analyze- \ // RUN: /cgthreads4 \ // RUN: /cgthreads8 \ @@ -199,6 +198,7 @@ // RUN: /nologo \ // RUN: /Ob1 \ // RUN: /Ob2 \ +// RUN: /openmp- \ // RUN: /RTC1 \ // RUN: /sdl \ // RUN: /sdl- \ @@ -211,6 +211,8 @@ // RUN: -### -- %s 2>&1 | FileCheck -check-prefix=IGNORED %s // IGNORED-NOT: argument unused during compilation // IGNORED-NOT: no such file or directory +// Don't confuse /openmp- with the /o flag: +// IGNORED-NOT: "-o" "penmp-.obj" // Ignored options and compile-only options are ignored for link jobs. // RUN: touch %t.obj