Skip to content

Noreturn call is not properly handled, should stop codegen after it #894

@ghehg

Description

@ghehg

The changes from PR893 exposed a problem that CIR gen is ignoring noreturn call.
e.g for following C code

void abort();
void test() { abort(); }

Clangir generates

define dso_local void @test() #1  {
  call void @abort(), 
  ret void
}

which is not right, right code should be like,

define dso_local void @test() #1  {
  call void @abort(), !dbg !8
  unreachable
}

Source code here needs implementation for no return call

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions