[PATCH] D88423: Fix llvm-link assert failure in BitCodeWriter

Richard Smith - zygoloid via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 28 16:55:34 PDT 2020


rsmith added inline comments.


================
Comment at: llvm/test/Linker/sret-types.ll:1
+; RUN: llvm-link %s %p/Inputs/sret-types-1.ll | llvm-dis | FileCheck %s
+
----------------
Simpler testcase (from https://reviews.llvm.org/D88241#2299465):

```
$ cat c.ll
define void @f(i8* sret({i64})) { ret void }
$ ./build/bin/opt - -o /tmp/tmp.ir # or anything that converts text IR to bitcode
```

There appear to be two issues here: the linker is not properly linking types inside attributes, and the value enumerator doesn't number types inside attributes. (I'm not sure if the linker relies on the value enumerator; maybe this patch fixes both issues, maybe not.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88423/new/

https://reviews.llvm.org/D88423



More information about the llvm-commits mailing list