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:
Eli Friedman 2011-03-24 05:09:45 +00:00
parent 4649f17db1
commit b4d3c99929
2 changed files with 6 additions and 2 deletions

View File

@ -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);

View File

@ -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);
}