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

Without this bail out, we may generate fields with null nodes as tags are generated by using getTypeInfo which has the same bail out. PR: https://github.com/llvm/llvm-project/pull/84386
25 lines
594 B
C++
25 lines
594 B
C++
// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - -O1 -relaxed-aliasing -fsanitize=thread -disable-llvm-optzns %s | \
|
|
// RUN: FileCheck %s
|
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin -new-struct-path-tbaa \
|
|
// RUN: -emit-llvm -o - -O1 -relaxed-aliasing -fsanitize=thread -disable-llvm-optzns %s | \
|
|
// RUN: FileCheck %s
|
|
//
|
|
// Check that we do not create tbaa for instructions generated for copies.
|
|
|
|
// CHECK-NOT: !tbaa
|
|
|
|
struct A {
|
|
short s;
|
|
int i;
|
|
char c;
|
|
int j;
|
|
};
|
|
|
|
void copyStruct(A *a1, A *a2) {
|
|
*a1 = *a2;
|
|
}
|
|
|
|
void copyInt(int *a, int *b) {
|
|
*a = *b;
|
|
}
|