forked from OSchip/llvm-project
Make sure we aggressively attach nounwind (etc.) to calls to library
functions of the form __builtin_XXX. llvm-svn: 128198
This commit is contained in:
parent
4649f17db1
commit
b4d3c99929
|
@ -948,8 +948,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
|
|||
getContext().BuiltinInfo.isPredefinedLibFunction(BuiltinID))
|
||||
return EmitCall(E->getCallee()->getType(),
|
||||
CGM.getBuiltinLibFunction(FD, BuiltinID),
|
||||
ReturnValueSlot(),
|
||||
E->arg_begin(), E->arg_end());
|
||||
ReturnValueSlot(), E->arg_begin(), E->arg_end(), FD);
|
||||
|
||||
// See if we have a target specific intrinsic.
|
||||
const char *Name = getContext().BuiltinInfo.GetName(BuiltinID);
|
||||
|
|
|
@ -10,3 +10,8 @@ void f0() {
|
|||
void f1() {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// CHECK: call i8* @strstr{{.*}} nounwind
|
||||
char* f2(char* a, char* b) {
|
||||
return __builtin_strstr(a, b);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue