File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -1988,6 +1988,21 @@ Error MCDataFragmentMerger::emitMergedFragments() {
19881988 return E;
19891989 break ;
19901990 }
1991+ case MCFragment::FT_LEB: {
1992+ const MCLEBFragment *LEBF = cast<MCLEBFragment>(Candidate.first );
1993+ Builder.Asm .writeFragmentPadding (FragmentOS, *LEBF, Candidate.second );
1994+ FragmentData.append (CandidateContents);
1995+ break ;
1996+ }
1997+
1998+ case MCFragment::FT_CVInlineLines: {
1999+ const MCCVInlineLineTableFragment *CVF =
2000+ cast<MCCVInlineLineTableFragment>(Candidate.first );
2001+ Builder.Asm .writeFragmentPadding (FragmentOS, *CVF, Candidate.second );
2002+ FragmentData.append (CandidateContents);
2003+ break ;
2004+ }
2005+
19912006 default :
19922007 llvm_unreachable (" other framgents should not be added" );
19932008 }
Original file line number Diff line number Diff line change 1+ ; This test was reduced using delta and llvm-reduce on a crash in MCCAS because
2+ ; of an FT_LEB fragment which was attempted to be merged into an
3+ ; MCMergedFragmentRef. If MCCAS behaves correctly, llc should not crash when
4+ ; trying to create an MCCAS representation of this LLVM IR file.
5+
6+ ; RUN: rm -rf %t && mkdir -p %t
7+ ; RUN: llc --filetype=obj --mccas-verify --cas-backend --cas-friendly-debug-info --cas=%t/cas %s -o %t/LEB.o
8+
9+ target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32"
10+ target triple = "arm64-apple-macosx14.0.0"
11+
12+ ; Function Attrs: noinline optnone
13+ define { ptr , i32 } @appendAnimation () #0 personality ptr @__objc_personality_v0 {
14+ %1 = invoke ptr null (ptr null , ptr null )
15+ to label %2 unwind label %3
16+
17+ 2 : ; preds = %0
18+ ret { ptr , i32 } zeroinitializer
19+
20+ 3 : ; preds = %0
21+ %4 = landingpad { ptr , i32 }
22+ catch ptr null
23+ ret { ptr , i32 } %4
24+ }
25+
26+ declare i32 @__objc_personality_v0 (...)
27+
28+ attributes #0 = { noinline optnone }
You can’t perform that action at this time.
0 commit comments