summaryrefslogtreecommitdiffstats
path: root/clang/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
commit6bd4f924e738d3fc925d9d0f624f116a1ba5b210 (patch)
tree775f196d46d003aa94d93c95395b3df89a2420bd /clang/include
parente981ce04c31e7acddbd2b9558ad459ce552039d4 (diff)
downloadbcm5719-llvm-6bd4f924e738d3fc925d9d0f624f116a1ba5b210.tar.gz
bcm5719-llvm-6bd4f924e738d3fc925d9d0f624f116a1ba5b210.zip
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. llvm-svn: 338602
Diffstat (limited to 'clang/include')
-rw-r--r--clang/include/clang/Basic/Builtins.def4
-rw-r--r--clang/include/clang/Basic/DiagnosticASTKinds.td14
2 files changed, 0 insertions, 18 deletions
diff --git a/clang/include/clang/Basic/Builtins.def b/clang/include/clang/Basic/Builtins.def
index c4d11cd827c..9089ce1b659 100644
--- a/clang/include/clang/Basic/Builtins.def
+++ b/clang/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/clang/include/clang/Basic/DiagnosticASTKinds.td b/clang/include/clang/Basic/DiagnosticASTKinds.td
index 3358fc3d70c..587254367be 100644
--- a/clang/include/clang/Basic/DiagnosticASTKinds.td
+++ b/clang/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">,
OpenPOWER on IntegriCloud