[PATCH] D100116: Reuse temporary files for print-changed=diff.

Jamie Schmeiser via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 27 07:20:19 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG3879fcdb8733: Reuse temporary files for print-changed=diff (authored by jamieschmeiser).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100116/new/

https://reviews.llvm.org/D100116

Files:
  llvm/lib/Passes/StandardInstrumentations.cpp


Index: llvm/lib/Passes/StandardInstrumentations.cpp
===================================================================
--- llvm/lib/Passes/StandardInstrumentations.cpp
+++ llvm/lib/Passes/StandardInstrumentations.cpp
@@ -132,8 +132,8 @@
   // Store the 2 bodies into temporary files and call diff on them
   // to get the body of the node.
   const unsigned NumFiles = 3;
-  std::string FileName[NumFiles];
-  int FD[NumFiles]{-1, -1, -1};
+  static std::string FileName[NumFiles];
+  static int FD[NumFiles]{-1, -1, -1};
   for (unsigned I = 0; I < NumFiles; ++I) {
     if (FD[I] == -1) {
       SmallVector<char, 200> SV;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100116.348258.patch
Type: text/x-patch
Size: 626 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210527/96a947bf/attachment.bin>


More information about the llvm-commits mailing list