From 550c4562d18a6ab6ce60a062dceb163313da0ddd Mon Sep 17 00:00:00 2001 From: Kirill Bobyrev Date: Mon, 15 Jun 2020 12:14:15 +0200 Subject: Revert "Prevent IR-gen from emitting consteval declarations" This reverts commit 3bab88b7baa20b276faaee0aa7ca87f636c91877. This patch causes test failures: http://lab.llvm.org:8011/builders/clang-cmake-armv7-quick/builds/17260 --- clang/lib/CodeGen/CodeGenModule.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 887df8a97f34..26d34fa293e4 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -3336,8 +3336,6 @@ llvm::Constant *CodeGenModule::GetAddrOfFunction(GlobalDecl GD, bool ForVTable, bool DontDefer, ForDefinition_t IsForDefinition) { - assert(!cast(GD.getDecl())->isConsteval() && - "consteval function should never be emitted"); // If there was no specific requested type, just convert it now. if (!Ty) { const auto *FD = cast(GD.getDecl()); @@ -5332,11 +5330,6 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) { if (D->isTemplated()) return; - // Consteval function shouldn't be emitted. - if (auto *FD = dyn_cast(D)) - if (FD->isConsteval()) - return; - switch (D->getKind()) { case Decl::CXXConversion: case Decl::CXXMethod: -- cgit v1.2.3