diff options
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 8 |
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()) { |
