From 11a18f115e8974ef24e8d5bb549ed3289871efa4 Mon Sep 17 00:00:00 2001 From: Kovarththanan Rajaratnam Date: Sun, 14 Mar 2010 07:06:50 +0000 Subject: Use makeAbsolute() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98472 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/CacheTokens.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'lib/Frontend/CacheTokens.cpp') diff --git a/lib/Frontend/CacheTokens.cpp b/lib/Frontend/CacheTokens.cpp index 21db55bb65..b845178064 100644 --- a/lib/Frontend/CacheTokens.cpp +++ b/lib/Frontend/CacheTokens.cpp @@ -534,13 +534,8 @@ void clang::CacheTokens(Preprocessor &PP, llvm::raw_fd_ostream* OS) { llvm::sys::Path MainFilePath(MainFile->getName()); std::string MainFileName; - if (!MainFilePath.isAbsolute()) { - llvm::sys::Path P = llvm::sys::Path::GetCurrentDirectory(); - P.appendComponent(MainFilePath.str()); - MainFileName = P.str(); - } else { - MainFileName = MainFilePath.str(); - } + MainFilePath.makeAbsolute(); + MainFileName = MainFilePath.str(); // Create the PTHWriter. PTHWriter PW(*OS, PP); -- cgit v1.2.3-70-g09d2