[PATCH] D29960: [PGO] Delay directory creation until write time

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 14 12:51:07 PST 2017


vsk added a comment.

Makes sense, I was thinking of something like this for a test;

  // RUN: %clang_profgen -o %t %s
  // RUN: env LLVM_PROFILE_FILE="%t.d/%m.profraw"
  // RUN: %run %t %t.d
  
  #include <unistd.h>
  
  int main(int argc, char **argv) {
    if (access(argv[1], F_OK) == 0)
      return 1; // %t.d should not exist yet.
    return errno == ENOENT;
  }


https://reviews.llvm.org/D29960





More information about the llvm-commits mailing list