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

Sanne Wouda via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 28 12:28:05 PDT 2020


sanwou01 added inline comments.


================
Comment at: llvm/lib/Bitcode/Writer/ValueEnumerator.cpp:408
+      if (A.hasAttribute(Attribute::ByVal))
+        EnumerateType(A.getParamByValType());
+
----------------
sanwou01 wrote:
> efriedma wrote:
> > getPointeeInMemoryValueType()?
> I figured there must be one that works for both, just had no idea which one. Thanks!
Hmm. I can't quite get this to work. getPointeeInMemoryValueType() seems to return a different type than getParamStructRetType()


```
(gdb) p A.hasAttribute(Attribute::StructRet)
$15 = true
(gdb) p A.getPointeeInMemoryValueType()
$12 = (llvm::Type *) 0xec7860
(gdb) p A.getParamStructRetType()
$14 = (llvm::Type *) 0xec7900
(gdb) p A.getParamStructRetType()->dump()
%"type 0xec7900" = type { i32 }
(gdb) p A.getPointeeInMemoryValueType()->dump()
%v = type { i32 }
```

I'm not sure what's going on there...


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