| Issue |
87817
|
| Summary |
[MIR] MIR file generated that cannot be parsed due to concatenated debug information
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
michaelmaitland
|
The issue is that clang can generate a `.mir` file that `llc` cannot parse. It looks like the MIR printer concatenated the debug-info-variable, debug-info-_expression_ and debug-info-location, but the MIR parser does not expect that.
Here is a reduced input file:
```
// reduced.c
typedef enum { a } b;
void c();
void d() {
int e;
{
b f;
c(&f);
}
c(&e);
}
```
Then to generate a MIR file:
```
clang -target riscv64-unknown-elf -g -mlittle-endian -fstack-protector-strong -O2 -c reduced.c -mllvm -stop-before=machine-scheduler -o reduced.mir`
```
Then to error out trying to parse that file:
```
llc -mtriple=riscv64 reduced.mir
```
The error I get is
```
error: reduced.mir:150:51: expected end of string after the metadata node
local-offset: -12, debug-info-variable: '!20!22', debug-info-_expression_: '!DIExpression()!DIExpression()',
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs