mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 17:26:07 +00:00

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
15 lines
452 B
C
15 lines
452 B
C
// RUN: rm -rf %t
|
|
// RUN: split-file %s %t
|
|
// RUN: not %clang -target x86_64-unknown-unknown -extract-api %t/first-header.h -x objective-c-header %t/second-header.h 2>&1 | FileCheck %s
|
|
|
|
// CHECK: error: header file
|
|
// CHECK-SAME: input 'objective-c-header' does not match the type of prior input in api extraction; use '-x c-header' to override
|
|
|
|
//--- first-header.h
|
|
|
|
void dummy_function(void);
|
|
|
|
//--- second-header.h
|
|
|
|
void other_dummy_function(void);
|