tingwang created this revision.
tingwang added reviewers: dsanders, rjmccall, spetrovic, vkalintiris,
john.brawn, petarj.
tingwang added a project: clang.
Herald added a project: All.
tingwang requested review of this revision.
Herald added a subscriber: cfe-commits.
Update patterns in this test case to align with opaque-pointers, otherwise it
will not be able to catch errors.
This is spotted during https://reviews.llvm.org/D133338 investigation. During
test after removed `!DirectTy->isStructTy()`, this test case still passed.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D133749
Files:
clang/test/CodeGen/struct-union-BE.c
Index: clang/test/CodeGen/struct-union-BE.c
===================================================================
--- clang/test/CodeGen/struct-union-BE.c
+++ clang/test/CodeGen/struct-union-BE.c
@@ -22,9 +22,9 @@
if (x.c != 10)
abort();
va_end (ap);
-// MIPS-NOT: %{{[0-9]+}} = getelementptr inbounds i8, i8* %argp.cur, i32 3
-// MIPS64-NOT: %{{[0-9]+}} = getelementptr inbounds i8, i8* %argp.cur, i64 7
-// ARM-NOT: %{{[0-9]+}} = getelementptr inbounds i8, i8* %argp.cur, i32 3
+// MIPS-NOT: %{{[0-9]+}} = getelementptr inbounds i8, ptr %argp.cur, i32 3
+// MIPS64-NOT: %{{[0-9]+}} = getelementptr inbounds i8, ptr %argp.cur, i64 7
+// ARM-NOT: %{{[0-9]+}} = getelementptr inbounds i8, ptr %argp.cur, i32 3
}
void funi(int n, ...) {
@@ -35,9 +35,9 @@
if (x.c != 10)
abort();
va_end (ap);
-// MIPS-NOT: %{{[0-9]+}} = getelementptr inbounds i8, i8* %argp.cur, i32 3
-// MIPS64-NOT: %{{[0-9]+}} = getelementptr inbounds i8, i8* %argp.cur, i64 7
-// ARM-NOT: %{{[0-9]+}} = getelementptr inbounds i8, i8* %argp.cur, i32 3
+// MIPS-NOT: %{{[0-9]+}} = getelementptr inbounds i8, ptr %argp.cur, i32 3
+// MIPS64-NOT: %{{[0-9]+}} = getelementptr inbounds i8, ptr %argp.cur, i64 7
+// ARM-NOT: %{{[0-9]+}} = getelementptr inbounds i8, ptr %argp.cur, i32 3
}
void foo(void) {
Index: clang/test/CodeGen/struct-union-BE.c
===================================================================
--- clang/test/CodeGen/struct-union-BE.c
+++ clang/test/CodeGen/struct-union-BE.c
@@ -22,9 +22,9 @@
if (x.c != 10)
abort();
va_end (ap);
-// MIPS-NOT: %{{[0-9]+}} = getelementptr inbounds i8, i8* %argp.cur, i32 3
-// MIPS64-NOT: %{{[0-9]+}} = getelementptr inbounds i8, i8* %argp.cur, i64 7
-// ARM-NOT: %{{[0-9]+}} = getelementptr inbounds i8, i8* %argp.cur, i32 3
+// MIPS-NOT: %{{[0-9]+}} = getelementptr inbounds i8, ptr %argp.cur, i32 3
+// MIPS64-NOT: %{{[0-9]+}} = getelementptr inbounds i8, ptr %argp.cur, i64 7
+// ARM-NOT: %{{[0-9]+}} = getelementptr inbounds i8, ptr %argp.cur, i32 3
}
void funi(int n, ...) {
@@ -35,9 +35,9 @@
if (x.c != 10)
abort();
va_end (ap);
-// MIPS-NOT: %{{[0-9]+}} = getelementptr inbounds i8, i8* %argp.cur, i32 3
-// MIPS64-NOT: %{{[0-9]+}} = getelementptr inbounds i8, i8* %argp.cur, i64 7
-// ARM-NOT: %{{[0-9]+}} = getelementptr inbounds i8, i8* %argp.cur, i32 3
+// MIPS-NOT: %{{[0-9]+}} = getelementptr inbounds i8, ptr %argp.cur, i32 3
+// MIPS64-NOT: %{{[0-9]+}} = getelementptr inbounds i8, ptr %argp.cur, i64 7
+// ARM-NOT: %{{[0-9]+}} = getelementptr inbounds i8, ptr %argp.cur, i32 3
}
void foo(void) {
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits