diff options
author | Eric Christopher <echristo@gmail.com> | 2017-03-20 22:31:33 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2017-03-20 22:31:33 +0000 |
commit | 2bf2333d4a843364002d6c2956b2e611d026c7a3 (patch) | |
tree | 0cbd0853917e7364e61f51f4432d0c8393bd9790 /test/Headers | |
parent | 03cd823a72f9f7b3c2dffe845bee9a983d9f06ea (diff) |
Fix parsing of htmxlintrin.h in C++ mode
- Fix a variable naming mismatch
- Fix gcc extension pointer arithmetic on void to cast to char *.
- Test that the header (and htmintrin.h) parse.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298318 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Headers')
-rw-r--r-- | test/Headers/htm-header.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Headers/htm-header.c b/test/Headers/htm-header.c new file mode 100644 index 0000000000..35a14983be --- /dev/null +++ b/test/Headers/htm-header.c @@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -triple powerpc64le-unknown-unknown -target-feature +htm -DHTM_HEADER -ffreestanding -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple powerpc64le-unknown-unknown -target-feature +htm -DHTM_HEADER -ffreestanding -emit-llvm -x c++ -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple powerpc64le-unknown-unknown -target-feature +htm -DHTMXL_HEADER -ffreestanding -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple powerpc64le-unknown-unknown -target-feature +htm -DHTMXL_HEADER -ffreestanding -emit-llvm -x c++ -o - %s | FileCheck %s + +#ifdef HTM_HEADER +#include <htmintrin.h> +#endif + +#ifdef HTMXL_HEADER +#include <htmxlintrin.h> +#endif + +// Verify that simply including the headers does not generate any code +// (i.e. all inline routines in the header are marked "static") + +// CHECK: target triple = "powerpc64 +// CHECK-NEXT: {{^$}} +// CHECK-NEXT: {{llvm\..*}} |