summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorserge-sans-paille <sguelton@redhat.com>2020-01-16 21:53:32 +0100
committerserge-sans-paille <sguelton@redhat.com>2020-01-17 10:01:55 +0100
commitcd4c65f91d5a77de28239979b772a8022dc6627a (patch)
tree2d3dfcd70f26f427d0128444cf21dc4d9fc27b21 /clang/lib/CodeGen
parent2d2d057ae23036baecb5a2a4a7f929626f46921a (diff)
downloadbcm5719-llvm-cd4c65f91d5a77de28239979b772a8022dc6627a.tar.gz
bcm5719-llvm-cd4c65f91d5a77de28239979b772a8022dc6627a.zip
Add __warn_memset_zero_len builtin as a workaround for glibc issue
Glibc issue: https://sourceware.org/bugzilla/show_bug.cgi?id=25399 The fix consist in considering the missing function as a builtin lowered to a nop. Differential Revision: https://reviews.llvm.org/D72869 (cherry picked from commit d293417931d3a9d46799b42795988ca3b5cfd766)
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGBuiltin.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 09fd3087b49..2d20f92fbb3 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -3222,6 +3222,8 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
Builder.CreateZExt(EmitSignBit(*this, EmitScalarExpr(E->getArg(0))),
ConvertType(E->getType())));
}
+ case Builtin::BI__warn_memset_zero_len:
+ return RValue::getIgnored();
case Builtin::BI__annotation: {
// Re-encode each wide string to UTF8 and make an MDString.
SmallVector<Metadata *, 1> Strings;
OpenPOWER on IntegriCloud