@@ -506,8 +506,7 @@ SILDeserializer::readSILFunctionChecked(DeclID FID, SILFunction *existingFn,
506
506
return maybeEntry.takeError ();
507
507
llvm::BitstreamEntry entry = maybeEntry.get ();
508
508
if (entry.Kind == llvm::BitstreamEntry::Error) {
509
- LLVM_DEBUG (llvm::dbgs () << " Cursor advance error in readSILFunction.\n " );
510
- MF->fatal ();
509
+ MF->fatal (" Cursor advance error in readSILFunction" );
511
510
}
512
511
513
512
SmallVector<uint64_t , 64 > scratch;
@@ -541,8 +540,7 @@ SILDeserializer::readSILFunctionChecked(DeclID FID, SILFunction *existingFn,
541
540
genericSigID, clangNodeOwnerID, SemanticsIDs);
542
541
543
542
if (funcTyID == 0 ) {
544
- LLVM_DEBUG (llvm::dbgs () << " SILFunction typeID is 0.\n " );
545
- MF->fatal ();
543
+ MF->fatal (" SILFunction typeID is 0" );
546
544
}
547
545
auto astType = MF->getTypeChecked (funcTyID);
548
546
if (!astType) {
@@ -555,8 +553,7 @@ SILDeserializer::readSILFunctionChecked(DeclID FID, SILFunction *existingFn,
555
553
}
556
554
auto ty = getSILType (astType.get (), SILValueCategory::Object, nullptr );
557
555
if (!ty.is <SILFunctionType>()) {
558
- LLVM_DEBUG (llvm::dbgs () << " not a function type for SILFunction\n " );
559
- MF->fatal ();
556
+ MF->fatal (" not a function type for SILFunction" );
560
557
}
561
558
562
559
SILFunction *replacedFunction = nullptr ;
@@ -574,16 +571,15 @@ SILDeserializer::readSILFunctionChecked(DeclID FID, SILFunction *existingFn,
574
571
if (!linkageOpt) {
575
572
LLVM_DEBUG (llvm::dbgs () << " invalid linkage code " << rawLinkage
576
573
<< " for SILFunction\n " );
577
- MF->fatal ();
574
+ MF->fatal (" invalid linkage code " );
578
575
}
579
576
SILLinkage linkage = linkageOpt.getValue ();
580
577
581
578
ValueDecl *clangNodeOwner = nullptr ;
582
579
if (clangNodeOwnerID != 0 ) {
583
580
clangNodeOwner = dyn_cast_or_null<ValueDecl>(MF->getDecl (clangNodeOwnerID));
584
581
if (!clangNodeOwner) {
585
- LLVM_DEBUG (llvm::dbgs () << " invalid clang node owner for SILFunction\n " );
586
- MF->fatal ();
582
+ MF->fatal (" invalid clang node owner for SILFunction" );
587
583
}
588
584
}
589
585
@@ -606,8 +602,7 @@ SILDeserializer::readSILFunctionChecked(DeclID FID, SILFunction *existingFn,
606
602
// If we have an existing function, verify that the types match up.
607
603
if (fn) {
608
604
if (fn->getLoweredType () != ty) {
609
- LLVM_DEBUG (llvm::dbgs () << " SILFunction type mismatch.\n " );
610
- MF->fatal ();
605
+ MF->fatal (" SILFunction type mismatch" );
611
606
}
612
607
613
608
fn->setSerialized (IsSerialized_t (isSerialized));
@@ -642,8 +637,7 @@ SILDeserializer::readSILFunctionChecked(DeclID FID, SILFunction *existingFn,
642
637
}
643
638
644
639
if (fn->isDynamicallyReplaceable () != isDynamic) {
645
- LLVM_DEBUG (llvm::dbgs () << " SILFunction type mismatch.\n " );
646
- MF->fatal ();
640
+ MF->fatal (" SILFunction type mismatch" );
647
641
}
648
642
649
643
} else {
@@ -840,8 +834,7 @@ SILDeserializer::readSILFunctionChecked(DeclID FID, SILFunction *existingFn,
840
834
841
835
// Handle a SILInstruction record.
842
836
if (readSILInstruction (fn, Builder, kind, scratch)) {
843
- LLVM_DEBUG (llvm::dbgs () << " readSILInstruction returns error.\n " );
844
- MF->fatal ();
837
+ MF->fatal (" readSILInstruction returns error" );
845
838
}
846
839
}
847
840
@@ -2936,8 +2929,7 @@ bool SILDeserializer::hasSILFunction(StringRef Name,
2936
2929
MF->fatal (maybeEntry.takeError ());
2937
2930
llvm::BitstreamEntry entry = maybeEntry.get ();
2938
2931
if (entry.Kind == llvm::BitstreamEntry::Error) {
2939
- LLVM_DEBUG (llvm::dbgs () << " Cursor advance error in hasSILFunction.\n " );
2940
- MF->fatal ();
2932
+ MF->fatal (" Cursor advance error in hasSILFunction" );
2941
2933
}
2942
2934
2943
2935
SmallVector<uint64_t , 64 > scratch;
@@ -3113,8 +3105,7 @@ SILGlobalVariable *SILDeserializer::readGlobalVar(StringRef Name) {
3113
3105
while (kind != SIL_FUNCTION && kind != SIL_VTABLE && kind != SIL_GLOBALVAR &&
3114
3106
kind != SIL_WITNESS_TABLE && kind != SIL_DIFFERENTIABILITY_WITNESS) {
3115
3107
if (readSILInstruction (nullptr , Builder, kind, scratch)) {
3116
- LLVM_DEBUG (llvm::dbgs () << " readSILInstruction returns error.\n " );
3117
- MF->fatal ();
3108
+ MF->fatal (" readSILInstruction returns error" );
3118
3109
}
3119
3110
3120
3111
// Fetch the next record.
@@ -3496,7 +3487,7 @@ llvm::Expected<SILWitnessTable *>
3496
3487
if (!Linkage) {
3497
3488
LLVM_DEBUG (llvm::dbgs () << " invalid linkage code " << RawLinkage
3498
3489
<< " for SILFunction\n " );
3499
- MF->fatal ();
3490
+ MF->fatal (" invalid linkage code " );
3500
3491
}
3501
3492
3502
3493
// Deserialize Conformance.
@@ -3518,8 +3509,7 @@ llvm::Expected<SILWitnessTable *>
3518
3509
// up.
3519
3510
if (wT) {
3520
3511
if (wT->getConformance () != theConformance) {
3521
- LLVM_DEBUG (llvm::dbgs () << " Conformance mismatch.\n " );
3522
- MF->fatal ();
3512
+ MF->fatal (" Conformance mismatch" );
3523
3513
}
3524
3514
3525
3515
// Don't override the linkage of a witness table with an existing
@@ -3663,13 +3653,13 @@ readDefaultWitnessTable(DeclID WId, SILDefaultWitnessTable *existingWt) {
3663
3653
if (!Linkage) {
3664
3654
LLVM_DEBUG (llvm::dbgs () << " invalid linkage code " << RawLinkage
3665
3655
<< " for SILFunction\n " );
3666
- MF->fatal ();
3656
+ MF->fatal (" invalid linkage code " );
3667
3657
}
3668
3658
3669
3659
ProtocolDecl *proto = cast<ProtocolDecl>(MF->getDecl (protoId));
3670
3660
if (proto == nullptr ) {
3671
3661
LLVM_DEBUG (llvm::dbgs () << " invalid protocol code " << protoId << " \n " );
3672
- MF->fatal ();
3662
+ MF->fatal (" invalid protocol code " );
3673
3663
}
3674
3664
3675
3665
PrettyStackTraceDecl trace (" deserializing default witness table for" , proto);
@@ -3682,8 +3672,7 @@ readDefaultWitnessTable(DeclID WId, SILDefaultWitnessTable *existingWt) {
3682
3672
// matches up.
3683
3673
if (wT) {
3684
3674
if (wT->getProtocol () != proto) {
3685
- LLVM_DEBUG (llvm::dbgs () << " Protocol mismatch.\n " );
3686
- MF->fatal ();
3675
+ MF->fatal (" Protocol mismatch" );
3687
3676
}
3688
3677
3689
3678
// Don't override the linkage of a default witness table with an existing
0 commit comments