Prior to this change the clang interface stubs format resembled
something ending with a symbol list like this:
Symbols:
a: { Type: Func }
This was problematic because we didn't actually want a map format and
also because we didn't like that an empty symbol list required
"Symbols: {}". That is to say without the empty {} llvm-ifs would crash
on an empty list.
With this new format it is much more clear which field is the symbol
name, and instead the [] that is used to express an empty symbol vector
is optional, ie:
Symbols:
- { Name: a, Type: Func }
or
Symbols: []
or
Symbols:
This further diverges the format from existing llvm-elftapi. This is a
good thing because although the format originally came from the same
place, they are not the same in any way.
Differential Revision: https://reviews.llvm.org/D76979
46 lines
2.2 KiB
C++
46 lines
2.2 KiB
C++
// RUN: not %clang -emit-interface-stubs -interface-stub-version=bad-format %s 2>&1 | \
|
|
// RUN: FileCheck %s
|
|
|
|
// RUN: not %clang -emit-interface-stubs -interface-stub-version=experimental-tapi-elf-v1 %s 2>&1 | \
|
|
// RUN: FileCheck -check-prefix=CHECK-TAPI-DEPRECATED %s
|
|
|
|
// RUN: not %clang -emit-interface-stubs -interface-stub-version=experimental-yaml-elf-v1 %s 2>&1 | \
|
|
// RUN: FileCheck -check-prefix=CHECK-YAML-DEPRECATED %s
|
|
|
|
// RUN: not %clang -emit-interface-stubs -interface-stub-version=experimental-ifs-v1 %s 2>&1 | \
|
|
// RUN: FileCheck -check-prefix=CHECK-V1-DEPRECATED %s
|
|
|
|
// RUN: not %clang -emit-interface-stubs -interface-stub-version=bad-format %s 2>&1 | \
|
|
// RUN: FileCheck %s
|
|
|
|
// RUN: not %clang -emit-interface-stubs \
|
|
// RUN: -interface-stub-version=experimental-tapi-elf-v1 %s 2>&1 | \
|
|
// RUN: FileCheck -check-prefix=CHECK-TAPI-DEPRECATED %s
|
|
|
|
// RUN: not %clang -emit-interface-stubs \
|
|
// RUN: -interface-stub-version=experimental-yaml-elf-v1 %s 2>&1 | \
|
|
// RUN: FileCheck -check-prefix=CHECK-YAML-DEPRECATED %s
|
|
|
|
// CHECK: error: invalid value
|
|
// CHECK: 'Invalid interface stub format: bad-format.' in 'Must specify a
|
|
// CHECK: valid interface stub format type, ie:
|
|
// CHECK: -interface-stub-version=experimental-ifs-v2'
|
|
|
|
// CHECK-TAPI-DEPRECATED: error: invalid value
|
|
// CHECK-TAPI-DEPRECATED: 'Invalid interface stub format:
|
|
// CHECK-TAPI-DEPRECATED: experimental-tapi-elf-v1 is deprecated.' in 'Must
|
|
// CHECK-TAPI-DEPRECATED: specify a valid interface stub format type, ie:
|
|
// CHECK-TAPI-DEPRECATED: -interface-stub-version=experimental-ifs-v2'
|
|
|
|
// CHECK-YAML-DEPRECATED: error: invalid value
|
|
// CHECK-YAML-DEPRECATED: 'Invalid interface stub format:
|
|
// CHECK-YAML-DEPRECATED: experimental-yaml-elf-v1 is deprecated.' in 'Must
|
|
// CHECK-YAML-DEPRECATED: specify a valid interface stub format type, ie:
|
|
// CHECK-YAML-DEPRECATED: -interface-stub-version=experimental-ifs-v2'
|
|
|
|
// CHECK-V1-DEPRECATED: error: invalid value
|
|
// CHECK-V1-DEPRECATED: 'Invalid interface stub format:
|
|
// CHECK-V1-DEPRECATED: experimental-ifs-v1 is deprecated.' in 'Must
|
|
// CHECK-V1-DEPRECATED: specify a valid interface stub format type, ie:
|
|
// CHECK-V1-DEPRECATED: -interface-stub-version=experimental-ifs-v2'
|