r315643 - Handle/assert on DK_Remark

Adam Nemet via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 12 16:56:54 PDT 2017


Author: anemet
Date: Thu Oct 12 16:56:54 2017
New Revision: 315643

URL: http://llvm.org/viewvc/llvm-project?rev=315643&view=rev
Log:
Handle/assert on DK_Remark

We don't generate remarks during inline assembly parsing so no need to handle
these for now.

Modified:
    cfe/trunk/lib/CodeGen/CodeGenAction.cpp

Modified: cfe/trunk/lib/CodeGen/CodeGenAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenAction.cpp?rev=315643&r1=315642&r2=315643&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenAction.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenAction.cpp Thu Oct 12 16:56:54 2017
@@ -433,6 +433,8 @@ void BackendConsumer::InlineAsmDiagHandl
   case llvm::SourceMgr::DK_Note:
     DiagID = diag::note_fe_inline_asm;
     break;
+  case llvm::SourceMgr::DK_Remark:
+    llvm_unreachable("remarks unexpected");
   }
   // If this problem has clang-level source location information, report the
   // issue in the source with a note showing the instantiated
@@ -919,6 +921,8 @@ static void BitcodeInlineAsmDiagHandler(
   case llvm::SourceMgr::DK_Note:
     DiagID = diag::note_fe_inline_asm;
     break;
+  case llvm::SourceMgr::DK_Remark:
+    llvm_unreachable("remarks unexpected");
   }
 
   Diags->Report(DiagID).AddString("cannot compile inline asm");




More information about the cfe-commits mailing list