summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriter.cpp
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2010-12-21 16:45:57 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2010-12-21 16:45:57 +0000
commit740857fa10e0e70b2145acb7164b9b526da89a0a (patch)
treea1435900132a2617e54d6667c4c1ac0dc9538171 /clang/lib/Serialization/ASTWriter.cpp
parentbc721825e8503fcb6fdcdb4ba900047b1d45b3ec (diff)
downloadbcm5719-llvm-740857fa10e0e70b2145acb7164b9b526da89a0a.tar.gz
bcm5719-llvm-740857fa10e0e70b2145acb7164b9b526da89a0a.zip
Replace all uses of PathV1::makeAbsolute with PathV2::fs::make_absolute.
llvm-svn: 122340
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriter.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 345cc8e74c7..bf07c52335b 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -41,6 +41,7 @@
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Bitcode/BitstreamWriter.h"
+#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include <cstdio>
@@ -810,9 +811,9 @@ void ASTWriter::WriteMetadata(ASTContext &Context, const char *isysroot) {
FileAbbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Blob)); // File name
unsigned FileAbbrevCode = Stream.EmitAbbrev(FileAbbrev);
- llvm::sys::Path MainFilePath(MainFile->getName());
+ llvm::SmallString<128> MainFilePath(MainFile->getName());
- MainFilePath.makeAbsolute();
+ llvm::sys::fs::make_absolute(MainFilePath);
const char *MainFileNameStr = MainFilePath.c_str();
MainFileNameStr = adjustFilenameForRelocatablePCH(MainFileNameStr,
@@ -1176,8 +1177,8 @@ void ASTWriter::WriteSourceManagerBlock(SourceManager &SourceMgr,
// 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));
- FilePath.makeAbsolute();
+ llvm::SmallString<128> FilePath(Filename);
+ llvm::sys::fs::make_absolute(FilePath);
Filename = FilePath.c_str();
Filename = adjustFilenameForRelocatablePCH(Filename, isysroot);
OpenPOWER on IntegriCloud