Enable noexcept on Windows, use for a few move constructors.
MSVC complains if you use noexcept with no exception handling mode specified (as we do). This code disables the warning. noexcept on move constructors allows better optimizations in some cases. http://en.cppreference.com/w/cpp/language/noexcept_spec Updates a few common classes' move constructors to use this. Review-Url: https://codereview.chromium.org/2771643002 Cr-Original-Commit-Position: refs/heads/master@{#458956} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 76aac97386e2788241161420c5e7e0bfee16f88c
This commit is contained in:
Родитель
9ec913a1c3
Коммит
4a2354d6ce
|
@ -303,17 +303,11 @@ config("compiler") {
|
|||
# ---------------------------------
|
||||
if (is_linux || is_android) {
|
||||
if (use_pic) {
|
||||
cflags += [
|
||||
"-fPIC",
|
||||
]
|
||||
ldflags += [
|
||||
"-fPIC",
|
||||
]
|
||||
cflags += [ "-fPIC" ]
|
||||
ldflags += [ "-fPIC" ]
|
||||
}
|
||||
|
||||
cflags += [
|
||||
"-pipe", # Use pipes for communicating between sub-processes. Faster.
|
||||
]
|
||||
cflags += [ "-pipe" ] # Use pipes for communicating between sub-processes. Faster.
|
||||
|
||||
ldflags += [
|
||||
"-Wl,-z,noexecstack",
|
||||
|
@ -905,6 +899,10 @@ config("default_warnings") {
|
|||
# This is necessary for the shared library build.
|
||||
"/wd4251",
|
||||
|
||||
# C4312 is a VS 2015 64-bit warning for integer to larger pointer.
|
||||
# TODO(brucedawson): fix warnings, crbug.com/554200
|
||||
"/wd4312",
|
||||
|
||||
# C4351: new behavior: elements of array 'array' will be default
|
||||
# initialized
|
||||
# This is a silly "warning" that basically just alerts you that the
|
||||
|
@ -967,10 +965,10 @@ config("default_warnings") {
|
|||
"/wd4459",
|
||||
]
|
||||
|
||||
cflags += [
|
||||
# C4312 is a VS 2015 64-bit warning for integer to larger pointer.
|
||||
# TODO(brucedawson): fix warnings, crbug.com/554200
|
||||
"/wd4312",
|
||||
cflags_cc += [
|
||||
# Allow "noexcept" annotations even though we compile with exceptions
|
||||
# disabled.
|
||||
"/wd4577",
|
||||
]
|
||||
|
||||
if (current_cpu == "x86") {
|
||||
|
|
Загрузка…
Ссылка в новой задаче