Revert "Turn some C-style vararg into variadic templates"

This reverts commit r299699, the examples needs to be updated.

llvm-svn: 299702
This commit is contained in:
Mehdi Amini
2017-04-06 20:23:57 +00:00
parent 98240e9643
commit db11fdfda5
22 changed files with 251 additions and 205 deletions

View File

@@ -481,15 +481,16 @@ BasicBlock *StackProtector::CreateFailBB() {
IRBuilder<> B(FailBB);
B.SetCurrentDebugLocation(DebugLoc::get(0, 0, F->getSubprogram()));
if (Trip.isOSOpenBSD()) {
Constant *StackChkFail = M->getOrInsertFunction(
"__stack_smash_handler", Type::getVoidTy(Context),
Type::getInt8PtrTy(Context));
Constant *StackChkFail =
M->getOrInsertFunction("__stack_smash_handler",
Type::getVoidTy(Context),
Type::getInt8PtrTy(Context), nullptr);
B.CreateCall(StackChkFail, B.CreateGlobalStringPtr(F->getName(), "SSH"));
} else {
Constant *StackChkFail =
M->getOrInsertFunction("__stack_chk_fail", Type::getVoidTy(Context));
M->getOrInsertFunction("__stack_chk_fail", Type::getVoidTy(Context),
nullptr);
B.CreateCall(StackChkFail, {});
}
B.CreateUnreachable();