From aadd7a48453b4f58bd8e1e9eb670918ee7d6a711 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 13 Nov 2009 05:13:58 +0000 Subject: [PATCH] Use StringRef::split instead of SplitString. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87085 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/InitHeaderSearch.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp index c9dd3c6d93..b630d107db 100644 --- a/lib/Frontend/InitHeaderSearch.cpp +++ b/lib/Frontend/InitHeaderSearch.cpp @@ -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 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple) { // FIXME: temporary hack: hard-coded paths. llvm::StringRef CIncludeDirs(C_INCLUDE_DIRS); if (CIncludeDirs != "") { - std::vector dirs; - llvm::SplitString(CIncludeDirs, dirs, ":"); - for (std::vector::iterator i = dirs.begin(); i != dirs.end(); ++i) + llvm::SmallVector dirs; + CIncludeDirs.split(dirs, ":"); + for (llvm::SmallVectorImpl::iterator i = dirs.begin(); + i != dirs.end(); + ++i) AddPath(*i, System, false, false, false); return; } -- 2.40.0