[arcmt] Remove some dead code.

Patch by Rafael Espíndola.

llvm-svn: 186462
This commit is contained in:
Argyrios Kyrtzidis 2013-07-16 22:24:06 +00:00
parent 57a113eb0d
commit 884bee86a6
2 changed files with 14 additions and 28 deletions

View File

@ -53,7 +53,6 @@ public:
StringRef outputDir = StringRef());
void remap(StringRef filePath, llvm::MemoryBuffer *memBuf);
void remap(StringRef filePath, StringRef newPath);
void applyMappings(PreprocessorOptions &PPOpts) const;

View File

@ -174,13 +174,7 @@ bool FileRemapper::overwriteOriginal(DiagnosticsEngine &Diag,
for (MappingsTy::iterator
I = FromToMappings.begin(), E = FromToMappings.end(); I != E; ++I) {
const FileEntry *origFE = I->first;
if (const FileEntry *newFE = I->second.dyn_cast<const FileEntry *>()) {
if (fs::copy_file(newFE->getName(), origFE->getName(),
fs::copy_option::overwrite_if_exists) != llvm::errc::success)
return report(StringRef("Could not copy file '") + newFE->getName() +
"' to file '" + origFE->getName() + "'", Diag);
} else {
assert(I->second.is<llvm::MemoryBuffer *>());
bool fileExists = false;
fs::exists(origFE->getName(), fileExists);
if (!fileExists)
@ -197,7 +191,6 @@ bool FileRemapper::overwriteOriginal(DiagnosticsEngine &Diag,
Out.write(mem->getBufferStart(), mem->getBufferSize());
Out.close();
}
}
clear(outputDir);
return false;
@ -237,12 +230,6 @@ void FileRemapper::remap(StringRef filePath, llvm::MemoryBuffer *memBuf) {
remap(getOriginalFile(filePath), memBuf);
}
void FileRemapper::remap(StringRef filePath, StringRef newPath) {
const FileEntry *file = getOriginalFile(filePath);
const FileEntry *newfile = FileMgr->getFile(newPath);
remap(file, newfile);
}
void FileRemapper::remap(const FileEntry *file, llvm::MemoryBuffer *memBuf) {
assert(file);
Target &targ = FromToMappings[file];