[llvm] 718ef34 - [llvm-c-test] Fix warnings

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 5 09:05:26 PDT 2025


Author: Kazu Hirata
Date: 2025-10-05T09:05:19-07:00
New Revision: 718ef3427a2ddd09122e2185962e4b241848d8b9

URL: https://github.com/llvm/llvm-project/commit/718ef3427a2ddd09122e2185962e4b241848d8b9
DIFF: https://github.com/llvm/llvm-project/commit/718ef3427a2ddd09122e2185962e4b241848d8b9.diff

LOG: [llvm-c-test] Fix warnings

This patch fixes:

  llvm/tools/llvm-c-test/debuginfo.c:330:20: error: unused variable
  'Phi1FirstDbgRecord' [-Werror,-Wunused-variable]

  llvm/tools/llvm-c-test/debuginfo.c:332:20: error: unused variable
  'Phi1LastDbgRecord' [-Werror,-Wunused-variable]

Added: 
    

Modified: 
    llvm/tools/llvm-c-test/debuginfo.c

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-c-test/debuginfo.c b/llvm/tools/llvm-c-test/debuginfo.c
index e376d82009be0..a2f4b3ee8b50c 100644
--- a/llvm/tools/llvm-c-test/debuginfo.c
+++ b/llvm/tools/llvm-c-test/debuginfo.c
@@ -328,8 +328,10 @@ int llvm_test_dibuilder(void) {
   // Test that LLVMGetFirstDbgRecord and LLVMGetLastDbgRecord return NULL for
   // instructions without debug info.
   LLVMDbgRecordRef Phi1FirstDbgRecord = LLVMGetFirstDbgRecord(Phi1);
+  (void)Phi1FirstDbgRecord;
   assert(Phi1FirstDbgRecord == NULL);
   LLVMDbgRecordRef Phi1LastDbgRecord = LLVMGetLastDbgRecord(Phi1);
+  (void)Phi1LastDbgRecord;
   assert(Phi1LastDbgRecord == NULL);
 
   // Insert a non-phi before the `ret` but not before the debug records to


        


More information about the llvm-commits mailing list