diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2014-04-28 02:38:51 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2014-04-28 02:38:51 +0000 |
commit | 7dd31334336c1659682703d2568f2bbac09591db (patch) | |
tree | 6dd0c0b406b81cb79ebe72a0868311f75e495636 /clang/lib/ARCMigrate/ObjCMT.cpp | |
parent | 2b99f2f7a48ede04f52b9dcd8cb62e0d144b749f (diff) | |
download | bcm5719-llvm-7dd31334336c1659682703d2568f2bbac09591db.tar.gz bcm5719-llvm-7dd31334336c1659682703d2568f2bbac09591db.zip |
[objcmt] Revert r191796, it's not needed anymore.
rdar://16223810
llvm-svn: 207391
Diffstat (limited to 'clang/lib/ARCMigrate/ObjCMT.cpp')
-rw-r--r-- | clang/lib/ARCMigrate/ObjCMT.cpp | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/clang/lib/ARCMigrate/ObjCMT.cpp b/clang/lib/ARCMigrate/ObjCMT.cpp index 3ae6724edc5..11837f79d6a 100644 --- a/clang/lib/ARCMigrate/ObjCMT.cpp +++ b/clang/lib/ARCMigrate/ObjCMT.cpp @@ -124,7 +124,7 @@ protected: NSAPIObj.reset(new NSAPI(Context)); Editor.reset(new edit::EditedSource(Context.getSourceManager(), Context.getLangOpts(), - PPRec, false)); + PPRec)); } bool HandleTopLevelDecl(DeclGroupRef DG) override { @@ -1698,34 +1698,6 @@ private: } -static bool -IsReallyASystemHeader(ASTContext &Ctx, const FileEntry *file, FileID FID) { - bool Invalid = false; - const SrcMgr::SLocEntry &SEntry = - Ctx.getSourceManager().getSLocEntry(FID, &Invalid); - if (!Invalid && SEntry.isFile()) { - const SrcMgr::FileInfo &FI = SEntry.getFile(); - if (!FI.hasLineDirectives()) { - if (FI.getFileCharacteristic() == SrcMgr::C_ExternCSystem) - return true; - if (FI.getFileCharacteristic() == SrcMgr::C_System) { - // This file is in a system header directory. Continue committing - // change only if it's a user-specified system directory because user - // put a .system_framework file in the framework directory. - StringRef Directory(file->getDir()->getName()); - size_t Ix = Directory.rfind(".framework"); - if (Ix == StringRef::npos) - return true; - std::string PatchToSystemFramework = Directory.slice(0, Ix+sizeof(".framework")); - PatchToSystemFramework += ".system_framework"; - if (!llvm::sys::fs::exists(PatchToSystemFramework.data())) - return true; - } - } - } - return false; -} - void ObjCMigrateASTConsumer::HandleTranslationUnit(ASTContext &Ctx) { TranslationUnitDecl *TU = Ctx.getTranslationUnitDecl(); @@ -1847,8 +1819,6 @@ void ObjCMigrateASTConsumer::HandleTranslationUnit(ASTContext &Ctx) { RewriteBuffer &buf = I->second; const FileEntry *file = Ctx.getSourceManager().getFileEntryForID(FID); assert(file); - if (IsReallyASystemHeader(Ctx, file, FID)) - continue; SmallString<512> newText; llvm::raw_svector_ostream vecOS(newText); buf.write(vecOS); |