[PATCH] D132977: [HLSL] Call global constructors inside entry
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 6 12:29:58 PDT 2022
aaron.ballman added inline comments.
================
Comment at: clang/test/CodeGenHLSL/GlobalConstructors.hlsl:3
+
+RWBuffer<float> Buffer;
+
----------------
Can you also add a test using `__attribute__((constructor))`? And probably one using `__attribute__((destructor))` at some point as well?
https://godbolt.org/z/jqedf1qGa
I see the docs said that global destructors are not supported, which is fine, but then what's the behavior when a user tries one anyway? (I would expect we'd get reasonable errors about it not being supported). Feel free to handle the dtor bits in a follow-up though.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132977/new/
https://reviews.llvm.org/D132977
More information about the cfe-commits
mailing list