Deleted Added
sdiff udiff text old ( 234353 ) new ( 239462 )
full compact
1//===--- TransGCAttrs.cpp - Transformations to ARC mode --------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "Transforms.h"
11#include "Internals.h"
12#include "clang/Lex/Lexer.h"
13#include "clang/Basic/SourceManager.h"
14#include "llvm/Support/SaveAndRestore.h"
15#include "clang/Sema/SemaDiagnostic.h"
16#include "llvm/ADT/SmallString.h"
17#include "llvm/ADT/TinyPtrVector.h"
18
19using namespace clang;
20using namespace arcmt;
21using namespace trans;
22
23namespace {
24
25/// \brief Collects all the places where GC attributes __strong/__weak occur.

--- 105 unchanged lines hidden (view full) ---

131 return FD->hasBody();
132
133 if (ObjCContainerDecl *ContD = dyn_cast<ObjCContainerDecl>(D))
134 return hasObjCImpl(ContD);
135
136 if (CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(D)) {
137 for (CXXRecordDecl::method_iterator
138 MI = RD->method_begin(), ME = RD->method_end(); MI != ME; ++MI) {
139 if ((*MI)->isOutOfLine())
140 return true;
141 }
142 return false;
143 }
144
145 return isMigratable(cast<Decl>(D->getDeclContext()));
146 }
147

--- 13 unchanged lines hidden (view full) ---

161 }
162
163 bool isInMainFile(Decl *D) {
164 if (!D)
165 return false;
166
167 for (Decl::redecl_iterator
168 I = D->redecls_begin(), E = D->redecls_end(); I != E; ++I)
169 if (!isInMainFile((*I)->getLocation()))
170 return false;
171
172 return true;
173 }
174
175 bool isInMainFile(SourceLocation Loc) {
176 if (Loc.isInvalid())
177 return false;

--- 181 unchanged lines hidden ---