[cfe-commits] r98473 - /cfe/trunk/lib/Frontend/PCHWriter.cpp
Kovarththanan Rajaratnam
kovarththanan.rajaratnam at gmail.com
Sat Mar 13 23:15:57 PST 2010
Author: krj
Date: Sun Mar 14 01:15:57 2010
New Revision: 98473
URL: http://llvm.org/viewvc/llvm-project?rev=98473&view=rev
Log:
Path related cleanup. Remove unnecessary variables.
Modified:
cfe/trunk/lib/Frontend/PCHWriter.cpp
Modified: cfe/trunk/lib/Frontend/PCHWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHWriter.cpp?rev=98473&r1=98472&r2=98473&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHWriter.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHWriter.cpp Sun Mar 14 01:15:57 2010
@@ -710,12 +710,10 @@
unsigned FileAbbrevCode = Stream.EmitAbbrev(FileAbbrev);
llvm::sys::Path MainFilePath(MainFile->getName());
- std::string MainFileName;
MainFilePath.makeAbsolute();
- MainFileName = MainFilePath.str();
- const char *MainFileNameStr = MainFileName.c_str();
+ const char *MainFileNameStr = MainFilePath.c_str();
MainFileNameStr = adjustFilenameForRelocatablePCH(MainFileNameStr,
isysroot);
RecordData Record;
@@ -1074,10 +1072,8 @@
// Turn the file name into an absolute path, if it isn't already.
const char *Filename = Content->Entry->getName();
llvm::sys::Path FilePath(Filename, strlen(Filename));
- std::string FilenameStr;
FilePath.makeAbsolute();
- FilenameStr = FilePath.str();
- Filename = FilenameStr.c_str();
+ Filename = FilePath.c_str();
Filename = adjustFilenameForRelocatablePCH(Filename, isysroot);
Stream.EmitRecordWithBlob(SLocFileAbbrv, Record, Filename);
More information about the cfe-commits
mailing list