clang 20.0.0git
TransRetainReleaseDealloc.cpp
Go to the documentation of this file.
1//===--- TransRetainReleaseDealloc.cpp - Transformations to ARC mode ------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// removeRetainReleaseDealloc:
10//
11// Removes retain/release/autorelease/dealloc messages.
12//
13// return [[foo retain] autorelease];
14// ---->
15// return foo;
16//
17//===----------------------------------------------------------------------===//
18
19#include "Transforms.h"
20#include "Internals.h"
22#include "clang/AST/ParentMap.h"
24#include "clang/Lex/Lexer.h"
26#include "llvm/ADT/StringSwitch.h"
27
28using namespace clang;
29using namespace arcmt;
30using namespace trans;