llvm-project/clang/test/Index/target-info.c
Emilio Cobos Alvarez 485ad42521 [libclang] Expose some target information via the C API.
This allows users to query the target triple and target pointer width, which
would make me able to fix https://github.com/servo/rust-bindgen/issues/593 and
other related bugs in an elegant way (without having to manually parse the
target triple in the command line arguments).

Differential Revision: https://reviews.llvm.org/D32389

llvm-svn: 301648
2017-04-28 15:56:39 +00:00

7 lines
369 B
C

// RUN: c-index-test -test-print-target-info %s --target=i386-unknown-linux-gnu | FileCheck %s
// RUN: c-index-test -test-print-target-info %s --target=x86_64-unknown-linux-gnu | FileCheck --check-prefix=CHECK-1 %s
// CHECK: TargetTriple: i386-unknown-linux-gnu
// CHECK: PointerWidth: 32
// CHECK-1: TargetTriple: x86_64-unknown-linux-gnu
// CHECK-1: PointerWidth: 64