summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2021-09-28 14:49:27 -0700
committerArthur Eubanks <aeubanks@google.com>2021-09-28 14:49:27 -0700
commit7833d20f1fd575fac89ce76822ffd561a40552e5 (patch)
tree1a22ff11531048dd1f3467f8a4cacd33897e4d1f /clang/lib/CodeGen/CodeGenModule.cpp
parentb69a2c8eeca1fee26283ca4c2f99c787aabba067 (diff)
Revert "[clang] Rework dontcall attributes"
This reverts commit 2943071e2ee0c7f31f34062a44d12aeb0e3a66fd. Breaks bots
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp8
1 files changed, 2 insertions, 6 deletions
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<SectionAttr>())
F->setSection(SA->getName());
- if (const auto *EA = FD->getAttr<ErrorAttr>()) {
- if (EA->isError())
- F->addFnAttr("dontcall-error", EA->getUserDiagnostic());
- else if (EA->isWarning())
- F->addFnAttr("dontcall-warn", EA->getUserDiagnostic());
- }
+ if (FD->hasAttr<ErrorAttr>())
+ F->addFnAttr("dontcall");
// If we plan on emitting this inline builtin, we can't treat it as a builtin.
if (FD->isInlineBuiltinDeclaration()) {