aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2018-08-01 17:51:23 +0000
committerHans Wennborg <hans@hanshq.net>2018-08-01 17:51:23 +0000
commitdb9b7f32ca3b6dc7f576b8e75834fb6277c01a19 (patch)
treef7fd630434805edba6273c4a6fffd794c82fdfee /include
parentfe1098c84823b8eac46b0bfffc5f5788b6c26d1a (diff)
downloadclang-db9b7f32ca3b6dc7f576b8e75834fb6277c01a19.tar.gz
Revert r338455 "[constexpr] Support for constant evaluation of __builtin_memcpy and __builtin_memmove (in non-type-punning cases)."
It caused asserts during Chromium builds, see reply on the cfe-commits thread. > This is intended to permit libc++ to make std::copy etc constexpr > without sacrificing the optimization that uses memcpy on > trivially-copyable types. > > __builtin_strcpy and __builtin_wcscpy are not handled by this change. > They'd be straightforward to add, but we haven't encountered a need for > them just yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338602 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/clang/Basic/Builtins.def4
-rw-r--r--include/clang/Basic/DiagnosticASTKinds.td14
2 files changed, 0 insertions, 18 deletions
diff --git a/include/clang/Basic/Builtins.def b/include/clang/Basic/Builtins.def
index c4d11cd827..9089ce1b65 100644
--- a/include/clang/Basic/Builtins.def
+++ b/include/clang/Basic/Builtins.def
@@ -471,8 +471,6 @@ BUILTIN(__builtin_wcslen, "zwC*", "nF")
BUILTIN(__builtin_wcsncmp, "iwC*wC*z", "nF")
BUILTIN(__builtin_wmemchr, "w*wC*wz", "nF")
BUILTIN(__builtin_wmemcmp, "iwC*wC*z", "nF")
-BUILTIN(__builtin_wmemcpy, "w*w*wC*z", "nF")
-BUILTIN(__builtin_wmemmove, "w*w*wC*z", "nF")
BUILTIN(__builtin_return_address, "v*IUi", "n")
BUILTIN(__builtin_extract_return_addr, "v*v*", "n")
BUILTIN(__builtin_frame_address, "v*IUi", "n")
@@ -910,8 +908,6 @@ LIBBUILTIN(wcslen, "zwC*", "f", "wchar.h", ALL_LANGUAGES)
LIBBUILTIN(wcsncmp, "iwC*wC*z", "f", "wchar.h", ALL_LANGUAGES)
LIBBUILTIN(wmemchr, "w*wC*wz", "f", "wchar.h", ALL_LANGUAGES)
LIBBUILTIN(wmemcmp, "iwC*wC*z", "f", "wchar.h", ALL_LANGUAGES)
-LIBBUILTIN(wmemcpy, "w*w*wC*z", "f", "wchar.h", ALL_LANGUAGES)
-LIBBUILTIN(wmemmove,"w*w*wC*z", "f", "wchar.h", ALL_LANGUAGES)
// C99
// In some systems setjmp is a macro that expands to _setjmp. We undefine
diff --git a/include/clang/Basic/DiagnosticASTKinds.td b/include/clang/Basic/DiagnosticASTKinds.td
index 3358fc3d70..587254367b 100644
--- a/include/clang/Basic/DiagnosticASTKinds.td
+++ b/include/clang/Basic/DiagnosticASTKinds.td
@@ -163,20 +163,6 @@ def note_constexpr_unsupported_unsized_array : Note<
def note_constexpr_unsized_array_indexed : Note<
"indexing of array without known bound is not allowed "
"in a constant expression">;
-def note_constexpr_memcpy_type_pun : Note<
- "cannot constant evaluate '%select{memcpy|memmove}0' from object of "
- "type %1 to object of type %2">;
-def note_constexpr_memcpy_nontrivial : Note<
- "cannot constant evaluate '%select{memcpy|memmove}0' between objects of "
- "non-trivially-copyable type %1">;
-def note_constexpr_memcpy_overlap : Note<
- "'%select{memcpy|wmemcpy}0' between overlapping memory regions">;
-def note_constexpr_memcpy_unsupported : Note<
- "'%select{%select{memcpy|wmemcpy}1|%select{memmove|wmemmove}1}0' "
- "not supported: %select{"
- "size to copy (%4) is not a multiple of size of element type %3 (%5)|"
- "source is not a contiguous array of at least %4 elements of type %3|"
- "destination is not a contiguous array of at least %4 elements of type %3}2">;
def warn_integer_constant_overflow : Warning<
"overflow in expression; result is %0 with type %1">,