mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-27 15:41:46 +00:00
clang: Don't use grep in a test
Issue #10894 seems to claim this wasn't working. The test does seem to
work as intended, except the CHECKs added in
3ac4299d37
aren't doing anything since
it wasn't really using FileCheck.
This commit is contained in:
parent
42c6e4209c
commit
d7fcb5b6b5
@ -1,5 +1,13 @@
|
||||
// RUN: %clang_cc1 -emit-llvm %s -o - | grep llvm.global.annotations
|
||||
// RUN: %clang_cc1 -emit-llvm %s -o - | grep llvm.var.annotation | count 3
|
||||
// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
|
||||
|
||||
// CHECK: @.str.3 = private unnamed_addr constant [28 x i8] c"GlobalValAnnotationWithArgs\00", section "llvm.metadata"
|
||||
// CHECK-NEXT: @.args = private unnamed_addr constant { i32, %struct.TestStruct } { i32 42, %struct.TestStruct { i32 1, i32 2 } }, section "llvm.metadata"
|
||||
|
||||
// CHECK: llvm.global.annotations
|
||||
|
||||
// CHECK: llvm.var.annotation
|
||||
// CHECK: llvm.var.annotation
|
||||
// CHECK: llvm.var.annotation
|
||||
|
||||
/* Global variable with attribute */
|
||||
int X __attribute__((annotate("GlobalValAnnotation")));
|
||||
@ -20,13 +28,11 @@ struct TestStruct {
|
||||
int b;
|
||||
};
|
||||
int Y __attribute__((annotate(
|
||||
"GlobalValAnnotationWithArgs",
|
||||
"GlobalValAnnotationWithArgs",
|
||||
42,
|
||||
(struct TestStruct) { .a = 1, .b = 2 }
|
||||
)));
|
||||
|
||||
// CHECK: @.str.3 = private unnamed_addr constant [28 x i8] c"GlobalValAnnotationWithArgs\00", section "llvm.metadata"
|
||||
// CHECK-NEXT: @.args = private unnamed_addr constant { i32, %struct.TestStruct } { i32 42, %struct.TestStruct { i32 1, i32 2 } }, section "llvm.metadata"
|
||||
|
||||
int main(void) {
|
||||
static int a __attribute__((annotate("GlobalValAnnotation")));
|
||||
|
Loading…
Reference in New Issue
Block a user