aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r--lib/CodeGen/CGExpr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index ec521a988b..c62b1b1073 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -2087,7 +2087,8 @@ void CodeGenFunction::EmitCheck(llvm::Value *Checked, StringRef CheckName,
.addAttribute(llvm::Attributes::UWTable);
llvm::Value *Fn = CGM.CreateRuntimeFunction(FnType,
("__ubsan_handle_" + CheckName).str(),
- llvm::Attributes::get(B));
+ llvm::Attributes::get(getLLVMContext(),
+ B));
llvm::CallInst *HandlerCall = Builder.CreateCall(Fn, Args);
HandlerCall->setDoesNotReturn();
HandlerCall->setDoesNotThrow();