From d2be4f95494e642b72852cc33e69a47016fe4a23 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Mon, 16 May 2022 17:01:09 -0700 Subject: [PATCH] [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 --- llvm/lib/AsmParser/LLParser.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index c723d71b744c..d6d8743e13f3 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -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(L.getTyVal())) { + if (K == lltok::star) + C.setOpaquePointers(false); return; } }