[cfe-commits] r79868 - in /cfe/trunk: lib/Basic/FileManager.cpp lib/Basic/SourceManager.cpp lib/Driver/Driver.cpp lib/Frontend/AnalysisConsumer.cpp lib/Frontend/CacheTokens.cpp lib/Frontend/FixItRewriter.cpp lib/Frontend/HTMLDiagnostics.cpp lib/Frontend/InitHeaderSearch.cpp lib/Frontend/InitPreprocessor.cpp lib/Frontend/PCHWriter.cpp tools/clang-cc/clang-cc.cpp
Chris Lattner
sabre at nondot.org
Sun Aug 23 15:45:33 PDT 2009
Author: lattner
Date: Sun Aug 23 17:45:33 2009
New Revision: 79868
URL: http://llvm.org/viewvc/llvm-project?rev=79868&view=rev
Log:
API changes to match llvm ToT.
Modified:
cfe/trunk/lib/Basic/FileManager.cpp
cfe/trunk/lib/Basic/SourceManager.cpp
cfe/trunk/lib/Driver/Driver.cpp
cfe/trunk/lib/Frontend/AnalysisConsumer.cpp
cfe/trunk/lib/Frontend/CacheTokens.cpp
cfe/trunk/lib/Frontend/FixItRewriter.cpp
cfe/trunk/lib/Frontend/HTMLDiagnostics.cpp
cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
cfe/trunk/lib/Frontend/InitPreprocessor.cpp
cfe/trunk/lib/Frontend/PCHWriter.cpp
cfe/trunk/tools/clang-cc/clang-cc.cpp
Modified: cfe/trunk/lib/Basic/FileManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/FileManager.cpp?rev=79868&r1=79867&r2=79868&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/FileManager.cpp (original)
+++ cfe/trunk/lib/Basic/FileManager.cpp Sun Aug 23 17:45:33 2009
@@ -19,6 +19,7 @@
#include "clang/Basic/FileManager.h"
#include "llvm/ADT/SmallString.h"
+#include "llvm/Support/raw_ostream.h"
#include "llvm/System/Path.h"
#include "llvm/Config/config.h"
using namespace clang;
Modified: cfe/trunk/lib/Basic/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/SourceManager.cpp?rev=79868&r1=79867&r2=79868&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/SourceManager.cpp (original)
+++ cfe/trunk/lib/Basic/SourceManager.cpp Sun Aug 23 17:45:33 2009
@@ -16,6 +16,7 @@
#include "clang/Basic/FileManager.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/MemoryBuffer.h"
+#include "llvm/Support/raw_ostream.h"
#include "llvm/System/Path.h"
#include <algorithm>
using namespace clang;
Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=79868&r1=79867&r2=79868&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Sun Aug 23 17:45:33 2009
@@ -478,19 +478,19 @@
// FIXME: The following handlers should use a callback mechanism, we
// don't know what the client would like to do.
if (Arg *A = C.getArgs().getLastArg(options::OPT_print_file_name_EQ)) {
- llvm::outs() << GetFilePath(A->getValue(C.getArgs()), TC).toString()
+ llvm::outs() << GetFilePath(A->getValue(C.getArgs()), TC).str()
<< "\n";
return false;
}
if (Arg *A = C.getArgs().getLastArg(options::OPT_print_prog_name_EQ)) {
- llvm::outs() << GetProgramPath(A->getValue(C.getArgs()), TC).toString()
+ llvm::outs() << GetProgramPath(A->getValue(C.getArgs()), TC).str()
<< "\n";
return false;
}
if (C.getArgs().hasArg(options::OPT_print_libgcc_file_name)) {
- llvm::outs() << GetFilePath("libgcc.a", TC).toString() << "\n";
+ llvm::outs() << GetFilePath("libgcc.a", TC).str() << "\n";
return false;
}
@@ -1239,7 +1239,7 @@
P.eraseFromDisk(false, 0);
P.appendSuffix(Suffix);
- return P.toString();
+ return P.str();
}
const HostInfo *Driver::GetHostInfo(const char *TripleStr) const {
Modified: cfe/trunk/lib/Frontend/AnalysisConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/AnalysisConsumer.cpp?rev=79868&r1=79867&r2=79868&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/AnalysisConsumer.cpp (original)
+++ cfe/trunk/lib/Frontend/AnalysisConsumer.cpp Sun Aug 23 17:45:33 2009
@@ -475,11 +475,10 @@
if (!ErrMsg.empty())
return 0;
- llvm::errs() << "Writing '" << Filename << "'.\n";
+ llvm::errs() << "Writing '" << Filename.str() << "'.\n";
llvm::OwningPtr<llvm::raw_fd_ostream> Stream;
- std::string filename = Filename.toString();
- Stream.reset(new llvm::raw_fd_ostream(filename.c_str(), ErrMsg,
+ Stream.reset(new llvm::raw_fd_ostream(Filename.c_str(), ErrMsg,
llvm::raw_fd_ostream::F_Force));
if (!ErrMsg.empty())
Modified: cfe/trunk/lib/Frontend/CacheTokens.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CacheTokens.cpp?rev=79868&r1=79867&r2=79868&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CacheTokens.cpp (original)
+++ cfe/trunk/lib/Frontend/CacheTokens.cpp Sun Aug 23 17:45:33 2009
@@ -543,10 +543,10 @@
if (!MainFilePath.isAbsolute()) {
llvm::sys::Path P = llvm::sys::Path::GetCurrentDirectory();
- P.appendComponent(MainFilePath.toString());
- MainFileName = P.toString();
+ P.appendComponent(MainFilePath.str());
+ MainFileName = P.str();
} else {
- MainFileName = MainFilePath.toString();
+ MainFileName = MainFilePath.str();
}
// Create the PTHWriter.
Modified: cfe/trunk/lib/Frontend/FixItRewriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/FixItRewriter.cpp?rev=79868&r1=79867&r2=79868&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/FixItRewriter.cpp (original)
+++ cfe/trunk/lib/Frontend/FixItRewriter.cpp Sun Aug 23 17:45:33 2009
@@ -55,7 +55,7 @@
Path.eraseSuffix();
Path.appendSuffix("fixit." + Suffix);
std::string Err;
- OutFile = new llvm::raw_fd_ostream(Path.toString().c_str(), Err,
+ OutFile = new llvm::raw_fd_ostream(Path.c_str(), Err,
llvm::raw_fd_ostream::F_Binary |
llvm::raw_fd_ostream::F_Force);
OwnedStream.reset(OutFile);
Modified: cfe/trunk/lib/Frontend/HTMLDiagnostics.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/HTMLDiagnostics.cpp?rev=79868&r1=79867&r2=79868&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/HTMLDiagnostics.cpp (original)
+++ cfe/trunk/lib/Frontend/HTMLDiagnostics.cpp Sun Aug 23 17:45:33 2009
@@ -151,7 +151,7 @@
if (!Directory.isDirectory()) {
llvm::errs() << "warning: could not create directory '"
- << Directory.toString() << "'\n"
+ << Directory.str() << "'\n"
<< "reason: " << ErrorMsg << '\n';
noDir = true;
@@ -236,7 +236,7 @@
if (!llvm::sys::Path(Entry->getName()).isAbsolute()) {
llvm::sys::Path P = llvm::sys::Path::GetCurrentDirectory();
- DirName = P.toString() + "/";
+ DirName = P.str() + "/";
}
// Add the name of the file as an <h1> tag.
@@ -329,10 +329,10 @@
H.appendSuffix("html");
F.renamePathOnDisk(H, NULL);
- os.open(H.toString().c_str());
+ os.open(H.c_str());
if (!os) {
- llvm::errs() << "warning: could not create file '" << F.toString() << "'\n";
+ llvm::errs() << "warning: could not create file '" << F.str() << "'\n";
return;
}
Modified: cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitHeaderSearch.cpp?rev=79868&r1=79867&r2=79868&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitHeaderSearch.cpp (original)
+++ cfe/trunk/lib/Frontend/InitHeaderSearch.cpp Sun Aug 23 17:45:33 2009
@@ -17,10 +17,10 @@
#include "clang/Basic/LangOptions.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallPtrSet.h"
+#include "llvm/Support/raw_ostream.h"
#include "llvm/System/Path.h"
#include "llvm/Config/config.h"
#include <cstdio>
-#include <vector>
using namespace clang;
void InitHeaderSearch::AddPath(const std::string &Path, IncludeDirGroup Group,
Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitPreprocessor.cpp?rev=79868&r1=79867&r2=79868&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original)
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Sun Aug 23 17:45:33 2009
@@ -78,7 +78,7 @@
// Escape double quotes etc.
Buf.push_back('"');
- std::string EscapedFile = Lexer::Stringify(Path.toString());
+ std::string EscapedFile = Lexer::Stringify(Path.str());
Buf.insert(Buf.end(), EscapedFile.begin(), EscapedFile.end());
Buf.push_back('"');
}
Modified: cfe/trunk/lib/Frontend/PCHWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHWriter.cpp?rev=79868&r1=79867&r2=79868&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHWriter.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHWriter.cpp Sun Aug 23 17:45:33 2009
@@ -542,10 +542,10 @@
if (!MainFilePath.isAbsolute()) {
llvm::sys::Path P = llvm::sys::Path::GetCurrentDirectory();
- P.appendComponent(MainFilePath.toString());
- MainFileName = P.toString();
+ P.appendComponent(MainFilePath.str());
+ MainFileName = P.str();
} else {
- MainFileName = MainFilePath.toString();
+ MainFileName = MainFilePath.str();
}
const char *MainFileNameStr = MainFileName.c_str();
@@ -895,8 +895,8 @@
std::string FilenameStr;
if (!FilePath.isAbsolute()) {
llvm::sys::Path P = llvm::sys::Path::GetCurrentDirectory();
- P.appendComponent(FilePath.toString());
- FilenameStr = P.toString();
+ P.appendComponent(FilePath.str());
+ FilenameStr = P.str();
Filename = FilenameStr.c_str();
}
Modified: cfe/trunk/tools/clang-cc/clang-cc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/clang-cc.cpp?rev=79868&r1=79867&r2=79868&view=diff
==============================================================================
--- cfe/trunk/tools/clang-cc/clang-cc.cpp (original)
+++ cfe/trunk/tools/clang-cc/clang-cc.cpp Sun Aug 23 17:45:33 2009
@@ -1743,7 +1743,7 @@
llvm::sys::Path Path(InFile);
Path.eraseSuffix();
Path.appendSuffix(Extension);
- OutFile = Path.toString();
+ OutFile = Path.str();
} else {
OutFile = "-";
}
More information about the cfe-commits
mailing list