1; REQUIRES: x86, non-root-user 2;; Not supported on windows since we use permissions to deny the creation 3; UNSUPPORTED: system-windows 4 5; RUN: opt -module-hash -module-summary %s -o %t.o 6; RUN: opt -module-hash -module-summary %p/Inputs/lto-cache.ll -o %t2.o 7; RUN: rm -Rf %t.cache && mkdir %t.cache 8; RUN: chmod 444 %t.cache 9 10;; Check emit warnings when we can't create the cache dir 11; RUN: not --crash lld-link /lldltocache:%t.cache/nonexistant/ /out:%t3 /entry:main %t2.o %t.o 2>&1 | FileCheck %s 12; CHECK: LLVM ERROR: can't create cache directory {{.*}}/nonexistant/: Permission denied 13 14target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 15target triple = "x86_64-pc-windows-msvc" 16 17define void @globalfunc() #0 { 18entry: 19 ret void 20} 21