Just a proof of concept to show this works. Handles all the examples from D76096, as far as I can tell.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Event Timeline
Comment Actions
Looks like @erichkeane was in the neighborhood in 606a734755d1fb6c35a17680d0c251f834b79334 ("[PR47636] Fix tryEmitPrivate to handle non-constantarraytypes").
Comment Actions
I took the tests from https://reviews.llvm.org/D76096 and combined it with this change. As mentioned in the last comment 606a734755d1fb6c35a17680d0c251f834b79334 causes conflicts, so I tried applying it to the commit just prior (f2efb5742cc9f74ad73987760651e3d23894a416). When running ninja clang-test, the following tests fail:
Failed Tests (8): Clang :: CodeGen/2009-06-14-anonymous-union-init.c Clang :: CodeGen/builtin-constant-p.c Clang :: CodeGen/pascal-string.c Clang :: CodeGenCXX/arm-swiftcall.cpp Clang :: Sema/array-init.c Clang :: Sema/builtins.c Clang :: Sema/const-eval.c Clang :: Sema/init.c