[PATCH] D135427: [LTO] Make local linkage GlobalValue in non-prevailing COMDAT available_externally

Alan Zhao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 10 16:47:36 PST 2022


ayzhao added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/FunctionImport.cpp:1166
+        continue;
+      assert(isa<GlobalValue>(GA.getAliasee()) &&
+             "non-GlobalValue aliasee is unimplemented");
----------------
MaskRay wrote:
> aeubanks wrote:
> > we're hitting this assert in a bootstrap build of clang with ThinLTO on windows: https://crbug.com/1382839
> How is the non-GlobalValue currently used? This feature in a COMDAT was not properly supported...
Not sure if this is helpful, but I loaded `lldb-link.exe` into a debugger, and calling `GA.dump()` when I hit this assertion resulted in the following:

```
@"??_7bad_array_new_length at stdext@@6B@" = unnamed_addr alias ptr, getelementptr inbounds ({ [4 x ptr] }, ptr @anon.2dbfeeb171d3ed35dcf0e9128a5a5941.7, i32 0, i32 0, i32 1)
```

FYI repro instructions are here: https://crbug.com/1382839#c6


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135427



More information about the llvm-commits mailing list