From 5c8e7596e6e886544cf99a9e9ee62d9bf0fc9ba3 Mon Sep 17 00:00:00 2001 From: "Ivan A. Kosarev" Date: Mon, 2 Oct 2017 11:10:04 +0000 Subject: [CodeGen] Have a special function to get TBAA info for may-alias accesses This is part of D37826 reworked to be a separate patch to simplify review. Differential Revision: https://reviews.llvm.org/D38408 llvm-svn: 314660 --- clang/lib/CodeGen/CodeGenModule.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 25779c044bb..ec122b795ce 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -599,6 +599,12 @@ llvm::MDNode *CodeGenModule::getTBAAStructTagInfo(QualType BaseTy, return TBAA->getTBAAStructTagInfo(BaseTy, AccessN, O); } +llvm::MDNode *CodeGenModule::getTBAAMayAliasTypeInfo() { + if (!TBAA) + return nullptr; + return TBAA->getMayAliasTypeInfo(); +} + /// Decorate the instruction with a TBAA tag. For both scalar TBAA /// and struct-path aware TBAA, the tag has the same format: /// base type, access type and offset. -- cgit v1.2.3