Don't use mangleCXXRTTIName in TBAA for C code.
authorManman Ren <manman.ren@gmail.com>
Wed, 21 Aug 2013 20:58:45 +0000 (20:58 +0000)
committerManman Ren <manman.ren@gmail.com>
Wed, 21 Aug 2013 20:58:45 +0000 (20:58 +0000)
commit879ce8841dc980104d1e99bd45ad6f15bb4efd2e
tree22f08ab9016385141039621e2642ac560ffd1c78
parent3380ee5e60c93c5bc8a9d6adc94cb84eb08cce46
Don't use mangleCXXRTTIName in TBAA for C code.

With r185721, calling mangleCXXRTTIName on C code will cause crashes.
This commit fixes crashes on C testing cases when turning on struct-path TBAA.

For C code, we simply use the Decl name without the context. This can
cause two different structs having the same name, and may cause inaccurate but
conservative alias results.

llvm-svn: 188930
clang/lib/CodeGen/CodeGenTBAA.cpp
clang/test/CodeGen/bitfield.c
clang/test/CodeGen/may-alias.c