From ab5cb55730ad27c9d711229d686aa0de994788dd Mon Sep 17 00:00:00 2001 From: Hans Wennborg <hans@hanshq.net> Date: Mon, 2 Mar 2015 22:09:05 +0000 Subject: [PATCH] clang-cl: Correctly ignore /openmp- (PR22748) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231026 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Driver/CLCompatOptions.td | 1 + test/Driver/cl-options.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/clang/Driver/CLCompatOptions.td b/include/clang/Driver/CLCompatOptions.td index 80630fcefaa..254093b1752 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 e7ace355458..2dc810d91e3 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 -- GitLab