[OpaquePtr][LLParser] Explicitly turn off opaque pointers if we see a star

If we turn on --opaque-pointers, tests with '*' would use opaque pointers.

Can't really test this without flipping the default value for --opaque-pointers.

Reviewed By: #opaque-pointers, nikic

Differential Revision: https://reviews.llvm.org/D125735
This commit is contained in:
Arthur Eubanks 2022-05-16 17:01:09 -07:00
parent 7afd257ff8
commit d2be4f9549
1 changed files with 2 additions and 0 deletions

View File

@ -66,6 +66,8 @@ static void setContextOpaquePointers(LLLexer &L, LLVMContext &C) {
// explicit "ptr".
if (K == lltok::star || K == lltok::Error || K == lltok::Eof ||
isa_and_nonnull<PointerType>(L.getTyVal())) {
if (K == lltok::star)
C.setOpaquePointers(false);
return;
}
}