[llvm] 8bfd69c - [llvm-c-test] Always set opaque pointers mode

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 1 03:55:53 PDT 2022


Author: Nikita Popov
Date: 2022-06-01T12:55:43+02:00
New Revision: 8bfd69ca33dd27c199652d5efa4e8a570c096edc

URL: https://github.com/llvm/llvm-project/commit/8bfd69ca33dd27c199652d5efa4e8a570c096edc
DIFF: https://github.com/llvm/llvm-project/commit/8bfd69ca33dd27c199652d5efa4e8a570c096edc.diff

LOG: [llvm-c-test] Always set opaque pointers mode

Avoid a behavior change when opaque pointers are enabled by default.

Added: 
    

Modified: 
    llvm/tools/llvm-c-test/echo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-c-test/echo.cpp b/llvm/tools/llvm-c-test/echo.cpp
index 56c9c441ad5e9..64f2122437f82 100644
--- a/llvm/tools/llvm-c-test/echo.cpp
+++ b/llvm/tools/llvm-c-test/echo.cpp
@@ -1401,8 +1401,7 @@ int llvm_echo(bool OpaquePointers) {
   size_t ModuleIdentLen;
   const char *ModuleName = LLVMGetModuleIdentifier(Src, &ModuleIdentLen);
   LLVMContextRef Ctx = LLVMContextCreate();
-  if (OpaquePointers)
-    LLVMContextSetOpaquePointers(Ctx, true);
+  LLVMContextSetOpaquePointers(Ctx, OpaquePointers);
   LLVMModuleRef M = LLVMModuleCreateWithNameInContext(ModuleName, Ctx);
 
   LLVMSetSourceFileName(M, SourceFileName, SourceFileLen);


        


More information about the llvm-commits mailing list