[PATCH] D19048: Test for a module related crash in CGDebugInfo.cpp

Douglas Yung via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 28 14:49:14 PDT 2016


dyung updated this revision to Diff 55495.
dyung added a comment.

Fixed up test and check for that DIImportedEntity and DIModule are present in the generated output.


http://reviews.llvm.org/D19048

Files:
  test/Modules/Inputs/getSourceDescriptor-crash/h1.h
  test/Modules/Inputs/getSourceDescriptor-crash/module.modulemap
  test/Modules/getSourceDescriptor-crash.cpp

Index: test/Modules/getSourceDescriptor-crash.cpp
===================================================================
--- test/Modules/getSourceDescriptor-crash.cpp
+++ test/Modules/getSourceDescriptor-crash.cpp
@@ -0,0 +1,8 @@
+// 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: DIModule
+// CHECK-SAME: name: "foo"
Index: test/Modules/Inputs/getSourceDescriptor-crash/module.modulemap
===================================================================
--- test/Modules/Inputs/getSourceDescriptor-crash/module.modulemap
+++ test/Modules/Inputs/getSourceDescriptor-crash/module.modulemap
@@ -0,0 +1,3 @@
+module foo {
+       header "h1.h"
+}
Index: test/Modules/Inputs/getSourceDescriptor-crash/h1.h
===================================================================
--- test/Modules/Inputs/getSourceDescriptor-crash/h1.h
+++ test/Modules/Inputs/getSourceDescriptor-crash/h1.h
@@ -0,0 +1 @@
+#pragma once


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19048.55495.patch
Type: text/x-patch
Size: 1077 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160428/3cf6c76a/attachment-0001.bin>


More information about the cfe-commits mailing list