hokein updated this revision to Diff 534473.
hokein added a comment.

address comments


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153652

Files:
  llvm/lib/Support/raw_ostream.cpp
  llvm/test/tools/llvm-dwarfutil/ELF/X86/file-permissions.test


Index: llvm/test/tools/llvm-dwarfutil/ELF/X86/file-permissions.test
===================================================================
--- /dev/null
+++ llvm/test/tools/llvm-dwarfutil/ELF/X86/file-permissions.test
@@ -0,0 +1,9 @@
+# RUN: yaml2obj %p/Inputs/common.yaml -o %t.o
+# RUN: chmod a+x %t.o
+
+# Verify that the output file preserves the executable bit from the input file.
+# RUN: llvm-dwarfutil --no-garbage-collection %t.o %t1
+# RUN: test -x %t1
+
+# RUN: llvm-dwarfutil --garbage-collection --separate-debug-file %t.o %t2
+# RUN: test -x %t2.debug
Index: llvm/lib/Support/raw_ostream.cpp
===================================================================
--- llvm/lib/Support/raw_ostream.cpp
+++ llvm/lib/Support/raw_ostream.cpp
@@ -1007,7 +1007,7 @@
     return Write(Out);
   }
 
-  unsigned Mode = sys::fs::all_read | sys::fs::all_write | sys::fs::all_exe;
+  unsigned Mode = sys::fs::all_read | sys::fs::all_write;
   Expected<sys::fs::TempFile> Temp =
       sys::fs::TempFile::create(OutputFileName + ".temp-stream-%%%%%%", Mode);
   if (!Temp)


Index: llvm/test/tools/llvm-dwarfutil/ELF/X86/file-permissions.test
===================================================================
--- /dev/null
+++ llvm/test/tools/llvm-dwarfutil/ELF/X86/file-permissions.test
@@ -0,0 +1,9 @@
+# RUN: yaml2obj %p/Inputs/common.yaml -o %t.o
+# RUN: chmod a+x %t.o
+
+# Verify that the output file preserves the executable bit from the input file.
+# RUN: llvm-dwarfutil --no-garbage-collection %t.o %t1
+# RUN: test -x %t1
+
+# RUN: llvm-dwarfutil --garbage-collection --separate-debug-file %t.o %t2
+# RUN: test -x %t2.debug
Index: llvm/lib/Support/raw_ostream.cpp
===================================================================
--- llvm/lib/Support/raw_ostream.cpp
+++ llvm/lib/Support/raw_ostream.cpp
@@ -1007,7 +1007,7 @@
     return Write(Out);
   }
 
-  unsigned Mode = sys::fs::all_read | sys::fs::all_write | sys::fs::all_exe;
+  unsigned Mode = sys::fs::all_read | sys::fs::all_write;
   Expected<sys::fs::TempFile> Temp =
       sys::fs::TempFile::create(OutputFileName + ".temp-stream-%%%%%%", Mode);
   if (!Temp)
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to