[PATCH] D49953: [compiler-rt] Add a routine to specify the mode used when creating profile dirs.

Matt Davis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 30 17:54:56 PDT 2018


mattd updated this revision to Diff 158144.
mattd added a comment.

- Added a test that creates a directory via __llvm_profile_recursive_mkdir and verifies the mode.
- I intend to only commit one of the two tests, but wanted to provide a more specific/detailed test.
  - I don't know if we really want such a specific test, but it's a potential start at one.
- We can definitely ignore windows here (since there is no mode passed to its equivalent to mkdir).
- I don't know if there are other systems we need to ignore, e.g., android?
- I'm still hesitant to adding the more specific test, it feels very os specific.
- I didn't see an alternative to FileCheck's (deprecated) %T, so I wrote a simple 'dirname' routine that is not dependent on libgen.
  - I hope that is sufficient for this test case.


https://reviews.llvm.org/D49953

Files:
  lib/profile/InstrProfilingUtil.c
  lib/profile/InstrProfilingUtil.h
  test/profile/instrprof-set-dir-mode.c
  test/profile/instrprof-set-dir-mode2.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49953.158144.patch
Type: text/x-patch
Size: 4187 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180731/ccde67fa/attachment-0001.bin>


More information about the cfe-commits mailing list