Don't perform dynamic_cast optimization at -O0.
authorRichard Smith <richard@metafoo.co.uk>
Tue, 25 Jul 2023 05:21:49 +0000 (22:21 -0700)
committerRichard Smith <richard@metafoo.co.uk>
Tue, 25 Jul 2023 05:24:33 +0000 (22:24 -0700)
commit6cf8179661997f8d512cdf944f4f4c0c01cb37c1
tree389ce9f78b93235b6921ebff3488208a23d27a13
parentef9ec4bbcca2fa4f64df47bc426f1d1c59ea47e2
Don't perform dynamic_cast optimization at -O0.

It seems preferable to avoid this optimization under -O0, and we're not
set up to emit speculative references to vtables at -O0 in general
anyway.

For #64088.
clang/lib/CodeGen/CGExprCXX.cpp
clang/test/CodeGenCXX/dynamic-cast-exact-disabled.cpp
clang/test/CodeGenCXX/dynamic-cast-exact.cpp