teak-llvm/clang/test/Driver/modules-cache-path.m
Ben Langmuir 3b7b540680 Make the default module cache user-specific
Appends the username to the first component (after the temp dir) of the
module cache path.  If the username contains a character that shouldn't
go into a path (for now conservatively allow [a-zA-Z0-9_]), we fallback
to the user id.

llvm-svn: 228013
2015-02-03 19:28:37 +00:00

6 lines
367 B
Matlab

// RUN: env USERNAME=asdf LOGNAME=asdf %clang -fmodules -### %s 2>&1 | FileCheck %s -check-prefix=CHECK-SET
// CHECK-SET: -fmodules-cache-path={{.*}}org.llvm.clang.asdf{{[/\\]+}}ModuleCache
// RUN: %clang -fmodules -### %s 2>&1 | FileCheck %s -check-prefix=CHECK-DEFAULT
// CHECK-DEFAULT: -fmodules-cache-path={{.*}}org.llvm.clang.{{[A-Za-z0-9_]*[/\\]+}}ModuleCache