From 603571a2d6daca43162bf1d9469baf919697c00a Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 10 Oct 2012 07:36:56 +0000 Subject: Remove the final bits of Attributes being declared in the Attribute namespace. Use the attribute's enum value instead. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165611 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExpr.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/CodeGen/CGExpr.cpp') diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 8b169410ce..8c9a80ace2 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -2079,11 +2079,13 @@ void CodeGenFunction::EmitCheck(llvm::Value *Checked, StringRef CheckName, llvm::FunctionType *FnType = llvm::FunctionType::get(CGM.VoidTy, ArgTypes, false); + llvm::Attributes::Builder B; + B.addAttribute(llvm::Attributes::NoReturn) + .addAttribute(llvm::Attributes::NoUnwind) + .addAttribute(llvm::Attributes::UWTable); llvm::Value *Fn = CGM.CreateRuntimeFunction(FnType, ("__ubsan_handle_" + CheckName).str(), - llvm::Attribute::NoReturn | - llvm::Attribute::NoUnwind | - llvm::Attribute::UWTable); + llvm::Attributes::get(B)); llvm::CallInst *HandlerCall = Builder.CreateCall(Fn, Args); HandlerCall->setDoesNotReturn(); HandlerCall->setDoesNotThrow(); -- cgit v1.2.3-70-g09d2