summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBuiltin.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-01-20 00:45:35 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-01-20 00:45:35 +0000
commit5e29dd3fe00825aef782c8071e5915d84344c371 (patch)
tree6cd09cdeee0d14cb1f8267acd03769bcbbd5fb11 /clang/lib/CodeGen/CGBuiltin.cpp
parent6ec3e3a728da4477f4cca941cc652cec2b064df9 (diff)
downloadbcm5719-llvm-5e29dd3fe00825aef782c8071e5915d84344c371.tar.gz
bcm5719-llvm-5e29dd3fe00825aef782c8071e5915d84344c371.zip
P0426: Make the library implementation of constexpr char_traits a little easier
by providing a memchr builtin that returns char* instead of void*. Also add a __has_feature flag to indicate the presence of constexpr forms of the relevant <string> functions. llvm-svn: 292555
Diffstat (limited to 'clang/lib/CodeGen/CGBuiltin.cpp')
-rw-r--r--clang/lib/CodeGen/CGBuiltin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 2ede1d46b3d..b3d02f1f51c 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -1189,6 +1189,10 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
return RValue::get(Dest.getPointer());
}
+ case Builtin::BI__builtin_char_memchr:
+ BuiltinID = Builtin::BI__builtin_memchr;
+ break;
+
case Builtin::BI__builtin___memcpy_chk: {
// fold __builtin_memcpy_chk(x, y, cst1, cst2) to memcpy iff cst1<=cst2.
llvm::APSInt Size, DstSize;
OpenPOWER on IntegriCloud