diff options
author | Ivan A. Kosarev <ikosarev@accesssoftek.com> | 2017-09-26 14:22:48 +0000 |
---|---|---|
committer | Ivan A. Kosarev <ikosarev@accesssoftek.com> | 2017-09-26 14:22:48 +0000 |
commit | b75a50b1212a4d632d194457eb34dd74277f7535 (patch) | |
tree | 2372939b42fc404276b5c94d5854adf2fd6c3870 /clang/lib/CodeGen/CodeGenTBAA.cpp | |
parent | 8af2387b91cfcc1ac152f55307b86d76bbd55170 (diff) | |
download | bcm5719-llvm-b75a50b1212a4d632d194457eb34dd74277f7535.tar.gz bcm5719-llvm-b75a50b1212a4d632d194457eb34dd74277f7535.zip |
Fix TBAA information for reference accesses
This patch fixes clang to decorate reference accesses as pointers
and not as "omnipotent chars".
Differential Revision: https://reviews.llvm.org/D38074
llvm-svn: 314209
Diffstat (limited to 'clang/lib/CodeGen/CodeGenTBAA.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenTBAA.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenTBAA.cpp b/clang/lib/CodeGen/CodeGenTBAA.cpp index 8a75a552d9f..3ae2956e6ea 100644 --- a/clang/lib/CodeGen/CodeGenTBAA.cpp +++ b/clang/lib/CodeGen/CodeGenTBAA.cpp @@ -145,10 +145,10 @@ CodeGenTBAA::getTBAAInfo(QualType QTy) { if (Ty->isStdByteType()) return MetadataCache[Ty] = getChar(); - // Handle pointers. + // Handle pointers and references. // TODO: Implement C++'s type "similarity" and consider dis-"similar" // pointers distinct. - if (Ty->isPointerType()) + if (Ty->isPointerType() || Ty->isReferenceType()) return MetadataCache[Ty] = createTBAAScalarType("any pointer", getChar()); |