[clang] 52cae05 - [ASan][Test] Fix expected strings for globals test
Marco Elver via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 10 11:26:39 PDT 2020
Author: Marco Elver
Date: 2020-06-10T20:26:24+02:00
New Revision: 52cae05e087b3d4fd02849fc37c387c720055ffb
URL: https://github.com/llvm/llvm-project/commit/52cae05e087b3d4fd02849fc37c387c720055ffb
DIFF: https://github.com/llvm/llvm-project/commit/52cae05e087b3d4fd02849fc37c387c720055ffb.diff
LOG: [ASan][Test] Fix expected strings for globals test
The expected strings would previously not catch bugs when redzones were
added when they were not actually expected. Fix by adding "global "
before the type.
Added:
Modified:
clang/test/CodeGen/asan-globals-alias.cpp
clang/test/CodeGen/asan-globals.cpp
Removed:
################################################################################
diff --git a/clang/test/CodeGen/asan-globals-alias.cpp b/clang/test/CodeGen/asan-globals-alias.cpp
index 1b6d4183261c..faf160ac79c9 100644
--- a/clang/test/CodeGen/asan-globals-alias.cpp
+++ b/clang/test/CodeGen/asan-globals-alias.cpp
@@ -7,8 +7,8 @@ int global; // to genera
int aliased_global; // KASAN - ignore globals prefixed by aliases with __-prefix (below)
extern int __attribute__((alias("aliased_global"))) __global_alias; // KASAN - aliased_global ignored
-// ASAN: @aliased_global{{.*}}{ i32, [60 x i8] }{{.*}}align 32
-// KASAN: @aliased_global{{.*}}i32
+// ASAN: @aliased_global{{.*}} global { i32, [60 x i8] }{{.*}}, align 32
+// KASAN: @aliased_global{{.*}} global i32
// CHECK-LABEL: define internal void @asan.module_ctor
// ASAN: call void @__asan_register_globals({{.*}}, i{{32|64}} 2)
diff --git a/clang/test/CodeGen/asan-globals.cpp b/clang/test/CodeGen/asan-globals.cpp
index 76373f59e424..cb6f2174c6a5 100644
--- a/clang/test/CodeGen/asan-globals.cpp
+++ b/clang/test/CodeGen/asan-globals.cpp
@@ -22,10 +22,10 @@ void func() {
const char *literal = "Hello, world!";
}
-// ASAN: sectioned_global{{.*}}{ i32, [60 x i8] }{{.*}}align 32
-// KASAN: sectioned_global{{.*}}i32
-// ASAN: @__special_global{{.*}}{ i32, [60 x i8] }{{.*}}align 32
-// KASAN: @__special_global{{.*}}i32
+// ASAN: sectioned_global{{.*}} global { i32, [60 x i8] }{{.*}}, align 32
+// KASAN: sectioned_global{{.*}} global i32
+// ASAN: @__special_global{{.*}} global { i32, [60 x i8] }{{.*}}, align 32
+// KASAN: @__special_global{{.*}} global i32
// CHECK-LABEL: define internal void @asan.module_ctor
// ASAN-NEXT: call void @__asan_init
More information about the cfe-commits
mailing list