HomePhabricator

[OpaquePtr] Introduce option to force all pointers to be opaque pointers

Authored by aeubanks on Jun 24 2021, 8:21 AM.

Description

[OpaquePtr] Introduce option to force all pointers to be opaque pointers

We don't want to start updating tests to use opaque pointers until we're
close to the opaque pointer transition. However, before the transition
we want to run tests as if pointers are opaque pointers to see if there
are any crashes.

At some point when we have a flag to only create opaque pointers in the
bitcode and textual IR readers, and when we have fixed all places that
try to read a pointee type, this flag will be useless. However, until
then, this can help us find issues more easily.

Since the cl::opt is read into LLVMContext, we need to make sure
LLVMContext is created after cl::ParseCommandLineOptions().

Previously ValueEnumerator would visit the value types of global values
via the pointer type, but with opaque pointers we have to manually visit
the value type.

Reviewed By: nikic, dexonsmith

Differential Revision: https://reviews.llvm.org/D103503

Details

Committed
aeubanksJun 24 2021, 1:32 PM
Reviewer
nikic
Differential Revision
D103503: [OpaquePtr] Introduce option to force all pointers to be opaque pointers
Parents
rG7110510ecacf: [WPD] Don't optimize calls more than once
Branches
Unknown
Tags
Unknown