From 37dec10dbc58f0da9b90861aa04d11ae0ed39935 Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Thu, 11 Feb 2016 19:19:18 +0000 Subject: [PR26550] Use a different TBAA root for C++ vs C. This commit changes the root from "Simple C/C++ TBAA" to "Simple C++ TBAA" for C++. The problem is that the type name in the TBAA nodes is generated differently for C vs C++. If we link an IR file for C with an IR file for C++, since they have the same root and the type names are different, accesses to the two type nodes will be considered no-alias, even though the two type nodes are from the same type in a header file. The fix is to use different roots for C and C++. Types from C will be treated conservatively in respect to types from C++. Follow-up commits will change the C root to "Simple C TBAA" plus some mangling change for C types to make it a little more aggresive. llvm-svn: 260567 --- clang/test/CodeGen/tbaa-class.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/test/CodeGen/tbaa-class.cpp') diff --git a/clang/test/CodeGen/tbaa-class.cpp b/clang/test/CodeGen/tbaa-class.cpp index f611ae5abb8..7172e05d9e3 100644 --- a/clang/test/CodeGen/tbaa-class.cpp +++ b/clang/test/CodeGen/tbaa-class.cpp @@ -199,7 +199,7 @@ uint32_t g12(StructC *C, StructD *D, uint64_t count) { } // CHECK: [[TYPE_char:!.*]] = !{!"omnipotent char", [[TAG_cxx_tbaa:!.*]], -// CHECK: [[TAG_cxx_tbaa]] = !{!"Simple C/C++ TBAA"} +// CHECK: [[TAG_cxx_tbaa]] = !{!"Simple C++ TBAA"} // CHECK: [[TAG_i32]] = !{[[TYPE_i32:!.*]], [[TYPE_i32]], i64 0} // CHECK: [[TYPE_i32]] = !{!"int", [[TYPE_char]], // CHECK: [[TAG_i16]] = !{[[TYPE_i16:!.*]], [[TYPE_i16]], i64 0} -- cgit v1.2.3