
clang -extract-api should accept multiple headers and forward them to a single CC1 instance. This change introduces a new ExtractAPIJobAction. Currently API Extraction is done during the Precompile phase as this is the current phase that matches the requirements the most. Adding a new phase would need to change some logic in how phases are scheduled. If the headers scheduled for API extraction are of different types the driver emits a diagnostic. Differential Revision: https://reviews.llvm.org/D121936
11 lines
447 B
C
11 lines
447 B
C
// RUN: %clang -target x86_64-unknown-unknown -ccc-print-phases -extract-api %s 2> %t
|
|
// RUN: echo 'END' >> %t
|
|
// RUN: FileCheck -check-prefix EXTRACT-API-PHASES -input-file %t %s
|
|
|
|
// EXTRACT-API-PHASES: 0: input,
|
|
// EXTRACT-API-PHASES-SAME: , c-header
|
|
// EXTRACT-API-PHASES-NEXT: 1: preprocessor, {0}, c-header-cpp-output
|
|
// EXTRACT-API-PHASES-NEXT: 2: api-extractor, {1}, api-information
|
|
// EXTRACT-API-PHASES-NOT: 3:
|
|
// EXTRACT-API-PHASES: END
|