[cfe-commits] r87085 - /cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
Rafael Espindola
rafael.espindola at gmail.com
Thu Nov 12 21:13:59 PST 2009
Author: rafael
Date: Thu Nov 12 23:13:58 2009
New Revision: 87085
URL: http://llvm.org/viewvc/llvm-project?rev=87085&view=rev
Log:
Use StringRef::split instead of SplitString.
Modified:
cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
Modified: cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitHeaderSearch.cpp?rev=87085&r1=87084&r2=87085&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitHeaderSearch.cpp (original)
+++ cfe/trunk/lib/Frontend/InitHeaderSearch.cpp Thu Nov 12 23:13:58 2009
@@ -18,6 +18,7 @@
#include "clang/Lex/HeaderSearch.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallPtrSet.h"
+#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Support/raw_ostream.h"
@@ -305,9 +306,11 @@
// FIXME: temporary hack: hard-coded paths.
llvm::StringRef CIncludeDirs(C_INCLUDE_DIRS);
if (CIncludeDirs != "") {
- std::vector<std::string> dirs;
- llvm::SplitString(CIncludeDirs, dirs, ":");
- for (std::vector<std::string>::iterator i = dirs.begin(); i != dirs.end(); ++i)
+ llvm::SmallVector<llvm::StringRef, 5> dirs;
+ CIncludeDirs.split(dirs, ":");
+ for (llvm::SmallVectorImpl<llvm::StringRef>::iterator i = dirs.begin();
+ i != dirs.end();
+ ++i)
AddPath(*i, System, false, false, false);
return;
}
More information about the cfe-commits
mailing list