blob: 2fa339ad2abf24bc0c4626626ed9ea8fc3eefdda [file] [log] [blame]
Volodymyr Sapsaibb709ad2018-05-01 23:59:33 +00001// REQUIRES: shell
2
3// Basic test
4// RUN: rm -rf %t.dir
5// RUN: mkdir %t.dir
6// RUN: mkdir %t.dir/a
7// RUN: mkdir %t.dir/b
8// RUN: echo "#ifndef HEADER_A" > %t.dir/a/header.h
9// RUN: echo "#define HEADER_A" >> %t.dir/a/header.h
10// RUN: echo "#endif" >> %t.dir/a/header.h
11// RUN: ln -s %t.dir/a/header.h %t.dir/b/header.h
12
13// RUN: %clang_cc1 -dependency-file %t.dir/file.deps -MT %s.o %s -fsyntax-only -I %t.dir -isystem %S/Inputs/SystemHeaderPrefix
14// RUN: FileCheck -input-file=%t.dir/file.deps %s
15// CHECK: dependency-gen-symlink.c.o
16// CHECK: dependency-gen-symlink.c
17// CHECK: a/header.h
18// CHECK: b/header.h
19// CHECK-NOT: with-header-guard.h
20#include "a/header.h"
21#include "b/header.h"
22// System header shouldn't be included in dependencies.
23#include <with-header-guard.h>
24#include <with-header-guard.h>