[applied] abidw: Remove temporary .typeid files when using --debug-abidiff

Message ID 87a6ny2gx8.fsf@redhat.com
State New
Headers
Series [applied] abidw: Remove temporary .typeid files when using --debug-abidiff |

Commit Message

Dodji Seketeli June 10, 2021, 9:43 a.m. UTC
  From 923a355f168fc647cd42dc5a137af0ba7fd1886a Mon Sep 17 00:00:00 2001
From: Dodji Seketeli <dodji@redhat.com>
Date: Wed, 9 Jun 2021 10:23:53 +0200
Subject: 

I noticed that the temporary typeid file generated by abidw when using
the --debug-abidiff option was left behind.  This patch removes it.

	* tools/abidw.cc (load_corpus_and_write_abixml): Remove temporary
	typeid file after its use.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to master.
---
 tools/abidw.cc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
  

Patch

diff --git a/tools/abidw.cc b/tools/abidw.cc
index 2234613b..3f38c695 100644
--- a/tools/abidw.cc
+++ b/tools/abidw.cc
@@ -591,7 +591,10 @@  load_corpus_and_write_abixml(char* argv[],
 #ifdef WITH_DEBUG_SELF_COMPARISON
 	  if (opts.debug_abidiff
 	      && !opts.type_id_file_path.empty())
-	    load_canonical_type_ids(*read_ctxt, opts.type_id_file_path);
+	    {
+	      load_canonical_type_ids(*read_ctxt, opts.type_id_file_path);
+	      remove(opts.type_id_file_path.c_str());
+	    }
 #endif
 	  t.start();
 	  corpus_sptr corp2 =