From 7833d20f1fd575fac89ce76822ffd561a40552e5 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Tue, 28 Sep 2021 14:49:27 -0700 Subject: Revert "[clang] Rework dontcall attributes" This reverts commit 2943071e2ee0c7f31f34062a44d12aeb0e3a66fd. Breaks bots --- clang/lib/CodeGen/CodeGenModule.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index d26b1343247f..83418014f0b5 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -2138,12 +2138,8 @@ void CodeGenModule::SetFunctionAttributes(GlobalDecl GD, llvm::Function *F, else if (const auto *SA = FD->getAttr()) F->setSection(SA->getName()); - if (const auto *EA = FD->getAttr()) { - if (EA->isError()) - F->addFnAttr("dontcall-error", EA->getUserDiagnostic()); - else if (EA->isWarning()) - F->addFnAttr("dontcall-warn", EA->getUserDiagnostic()); - } + if (FD->hasAttr()) + F->addFnAttr("dontcall"); // If we plan on emitting this inline builtin, we can't treat it as a builtin. if (FD->isInlineBuiltinDeclaration()) { -- cgit v1.2.3