From 5922a816bd98f939fae01821a00e0a512b53e79f Mon Sep 17 00:00:00 2001 From: Ben Langmuir Date: Mon, 29 Jun 2015 17:09:24 +0000 Subject: [PATCH] [Modules] Test lock file removed on signal For r240967. rdar://problem/21512307 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240968 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Modules/Inputs/crash.h | 1 + test/Modules/Inputs/module.map | 3 +++ test/Modules/signal.m | 11 +++++++++++ 3 files changed, 15 insertions(+) create mode 100644 test/Modules/Inputs/crash.h create mode 100644 test/Modules/signal.m diff --git a/test/Modules/Inputs/crash.h b/test/Modules/Inputs/crash.h new file mode 100644 index 0000000000..bc878fbcb0 --- /dev/null +++ b/test/Modules/Inputs/crash.h @@ -0,0 +1 @@ +#pragma clang __debug crash diff --git a/test/Modules/Inputs/module.map b/test/Modules/Inputs/module.map index 8ec3e21121..fe762f54a1 100644 --- a/test/Modules/Inputs/module.map +++ b/test/Modules/Inputs/module.map @@ -324,3 +324,6 @@ module recursive1 { module recursive2 { header "recursive2.h" } +module crash { + header "crash.h" +} diff --git a/test/Modules/signal.m b/test/Modules/signal.m new file mode 100644 index 0000000000..30059e9351 --- /dev/null +++ b/test/Modules/signal.m @@ -0,0 +1,11 @@ +// REQUIRES: shell +// RUN: rm -rf %t + +// Crash building module. +// RUN: not --crash %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs %s + +// The dead symlink is still around, but the underlying lock file is gone. +// RUN: find %t -name "crash-*.pcm.lock" | count 1 +// RUN: find %t -name "crash-*.pcm.lock-*" | count 0 + +@import crash; -- 2.50.1