diff options
author | Manman Ren <manman.ren@gmail.com> | 2013-10-08 00:08:49 +0000 |
---|---|---|
committer | Manman Ren <manman.ren@gmail.com> | 2013-10-08 00:08:49 +0000 |
commit | 4f755deaf659f2b07ed4f83eb5b73a68c9b2eade (patch) | |
tree | 8a95ff30a82387c1ccad4278a4227a75dbdea4d1 /clang/test/CodeGen/tbaa-for-vptr.cpp | |
parent | db49a5df475ba63e09a7abc2c40e9f6334a91e75 (diff) | |
download | bcm5719-llvm-4f755deaf659f2b07ed4f83eb5b73a68c9b2eade.tar.gz bcm5719-llvm-4f755deaf659f2b07ed4f83eb5b73a68c9b2eade.zip |
TBAA: use the same format for scalar TBAA and struct-path aware TBAA.
An updated version of r191586 with bug fix.
Struct-path aware TBAA generates tags to specify the access path,
while scalar TBAA only generates tags to scalar types.
We should not generate a TBAA tag with null being the first field. When
a TBAA type node is null, the tag should be null too. Make sure we
don't decorate an instruction with a null TBAA tag.
Added a testing case for the bug reported by Richard with -relaxed-aliasing
and -fsanitizer=thread.
llvm-svn: 192145
Diffstat (limited to 'clang/test/CodeGen/tbaa-for-vptr.cpp')
-rw-r--r-- | clang/test/CodeGen/tbaa-for-vptr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/CodeGen/tbaa-for-vptr.cpp b/clang/test/CodeGen/tbaa-for-vptr.cpp index 334c9ddaf4a..7ba058bffe6 100644 --- a/clang/test/CodeGen/tbaa-for-vptr.cpp +++ b/clang/test/CodeGen/tbaa-for-vptr.cpp @@ -23,5 +23,6 @@ void CallFoo(A *a) { // CHECK: %{{.*}} = load {{.*}} !tbaa ![[NUM:[0-9]+]] // CHECK: store {{.*}} !tbaa ![[NUM]] -// CHECK: [[NUM]] = metadata !{metadata !"vtable pointer", metadata !{{.*}}} +// CHECK: [[NUM]] = metadata !{metadata [[TYPE:!.*]], metadata [[TYPE]], i64 0} +// CHECK: [[TYPE]] = metadata !{metadata !"vtable pointer", metadata !{{.*}} // NOTBAA-NOT: = metadata !{metadata !"Simple C/C++ TBAA"} |