]> granicus.if.org Git - clang/commitdiff
Handle/assert on DK_Remark
authorAdam Nemet <anemet@apple.com>
Thu, 12 Oct 2017 23:56:54 +0000 (23:56 +0000)
committerAdam Nemet <anemet@apple.com>
Thu, 12 Oct 2017 23:56:54 +0000 (23:56 +0000)
We don't generate remarks during inline assembly parsing so no need to handle
these for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315643 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenAction.cpp

index 7f9c3771f14babe6d2d034749a36008aa0bec994..6ca69d63cdce763b4697fc944daf4c5b0f6c2913 100644 (file)
@@ -433,6 +433,8 @@ void BackendConsumer::InlineAsmDiagHandler2(const llvm::SMDiagnostic &D,
   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(const llvm::SMDiagnostic &SM,
   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");