clang-cl: Don't warn about /Oy- being unused in 64-bit builds.

http://reviews.llvm.org/D18392

llvm-svn: 264163
This commit is contained in:
Nico Weber 2016-03-23 15:37:41 +00:00
parent 6a83143650
commit 9c3fca3698
2 changed files with 9 additions and 3 deletions

View File

@ -702,6 +702,12 @@ static void TranslateOptArg(Arg *A, llvm::opt::DerivedArgList &DAL,
else
DAL.AddFlagArg(
A, Opts.getOption(options::OPT_fno_omit_frame_pointer));
} else {
// Don't warn about /Oy- in 64-bit builds (where
// SupportsForcingFramePointer is false). The flag having no effect
// there is a compiler-internal optimization, and people shouldn't have
// to special-case their build files for 64-bit clang-cl.
A->claim();
}
break;
}

View File

@ -123,13 +123,13 @@
// PR24003: -momit-leaf-frame-pointer
// PR24003: -Os
// RUN: %clang_cl --target=i686-pc-win32 /Oy- /O2 -### -- %s 2>&1 | FileCheck -check-prefix=Oy_2 %s
// RUN: %clang_cl --target=i686-pc-win32 -Werror /Oy- /O2 -### -- %s 2>&1 | FileCheck -check-prefix=Oy_2 %s
// Oy_2: -momit-leaf-frame-pointer
// Oy_2: -O2
// RUN: %clang_cl /Zs /Oy -- %s 2>&1
// RUN: %clang_cl /Zs -Werror /Oy -- %s 2>&1
// RUN: %clang_cl --target=i686-pc-win32 /Oy- -### -- %s 2>&1 | FileCheck -check-prefix=Oy_ %s
// RUN: %clang_cl --target=i686-pc-win32 -Werror /Oy- -### -- %s 2>&1 | FileCheck -check-prefix=Oy_ %s
// Oy_: -mdisable-fp-elim
// RUN: %clang_cl /Qvec -### -- %s 2>&1 | FileCheck -check-prefix=Qvec %s