Adding a test for a compiler crash that was fixed in r248069.
authorDouglas Yung <douglas.yung@sony.com>
Tue, 3 May 2016 00:29:56 +0000 (00:29 +0000)
committerDouglas Yung <douglas.yung@sony.com>
Tue, 3 May 2016 00:29:56 +0000 (00:29 +0000)
Differential Revision: http://reviews.llvm.org/D19048

llvm-svn: 268344

clang/test/Modules/Inputs/getSourceDescriptor-crash/h1.h [new file with mode: 0644]
clang/test/Modules/Inputs/getSourceDescriptor-crash/module.modulemap [new file with mode: 0644]
clang/test/Modules/getSourceDescriptor-crash.cpp [new file with mode: 0644]

diff --git a/clang/test/Modules/Inputs/getSourceDescriptor-crash/h1.h b/clang/test/Modules/Inputs/getSourceDescriptor-crash/h1.h
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
diff --git a/clang/test/Modules/Inputs/getSourceDescriptor-crash/module.modulemap b/clang/test/Modules/Inputs/getSourceDescriptor-crash/module.modulemap
new file mode 100644 (file)
index 0000000..2006ed5
--- /dev/null
@@ -0,0 +1,3 @@
+module foo {
+       header "h1.h"
+}
diff --git a/clang/test/Modules/getSourceDescriptor-crash.cpp b/clang/test/Modules/getSourceDescriptor-crash.cpp
new file mode 100644 (file)
index 0000000..ebc25c0
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -I %S/Inputs/getSourceDescriptor-crash -S -emit-llvm -debug-info-kind=limited -fimplicit-module-maps %s -o - | FileCheck %s
+
+#include "h1.h"
+#include "h1.h"
+
+// CHECK: DIImportedEntity
+// CHECK-SAME: entity: ![[ENTITY:[0-9]+]]
+// CHECK: ![[ENTITY]] = !DIModule
+// CHECK-SAME: name: "foo"