brintos

brintos / llvm-project-archived public Read only

0
0
Text · 789 B · 04a3652 Raw
30 lines · cpp
1// Check that clang-scan-deps works with cc1 command lines2 3// RUN: rm -rf %t4// RUN: split-file %s %t5 6 7//--- modules_cc1.cpp8#include "header.h"9 10//--- header.h11 12//--- module.modulemap13module header1 { header "header.h" }14 15//--- cdb.json.template16[{17  "file": "DIR/modules_cc1.cpp",18  "directory": "DIR",19  "command": "clang -cc1 DIR/modules_cc1.cpp -fimplicit-module-maps -o modules_cc1.o"20}]21 22// RUN: sed "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json23// RUN: clang-scan-deps -compilation-database %t/cdb.json -j 1 -mode preprocess-dependency-directives > %t/result24// RUN: cat %t/result | sed 's:\\\\\?:/:g' | FileCheck %s -DPREFIX=%/t25 26// CHECK: modules_cc1.o:27// CHECK-NEXT: [[PREFIX]]/modules_cc1.cpp28// CHECK-NEXT: [[PREFIX]]/module.modulemap29// CHECK-NEXT: [[PREFIX]]/header.h30