diff --git a/tools/llvmc2/AutoGenerated.cpp b/tools/llvmc2/AutoGenerated.cpp index 9b0255cefc8..e01702653aa 100644 --- a/tools/llvmc2/AutoGenerated.cpp +++ b/tools/llvmc2/AutoGenerated.cpp @@ -15,6 +15,7 @@ #include "CompilationGraph.h" #include "Tool.h" +#include "llvm/ADT/StringExtras.h" #include "llvm/Support/CommandLine.h" #include diff --git a/tools/llvmc2/Tool.cpp b/tools/llvmc2/Tool.cpp deleted file mode 100644 index eea0145d4aa..00000000000 --- a/tools/llvmc2/Tool.cpp +++ /dev/null @@ -1,21 +0,0 @@ -//===--- Tools.cpp - The LLVM Compiler Driver -------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open -// Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Tool abstract base class - implementation of the auxiliary functions. -// -//===----------------------------------------------------------------------===// - -#include "Tool.h" - -#include "llvm/ADT/StringExtras.h" - -void llvmc::Tool::UnpackValues (const std::string& from, - std::vector& to) { - llvm::SplitString(from, to, ","); -} diff --git a/tools/llvmc2/Tool.h b/tools/llvmc2/Tool.h index 1cac7eed697..122c887ca9e 100644 --- a/tools/llvmc2/Tool.h +++ b/tools/llvmc2/Tool.h @@ -44,12 +44,6 @@ namespace llvmc { virtual bool IsLast() const = 0; virtual bool IsJoin() const = 0; - - // Helper function that is called by the auto-generated code - // Splits strings of the form ",-foo,-bar,-baz" - // TOFIX: find a better name - static void UnpackValues (std::string const& from, - std::vector& to); }; // Join tools have an input file list associated with them. diff --git a/utils/TableGen/LLVMCConfigurationEmitter.cpp b/utils/TableGen/LLVMCConfigurationEmitter.cpp index 32b6d383288..ab6f2efc484 100644 --- a/utils/TableGen/LLVMCConfigurationEmitter.cpp +++ b/utils/TableGen/LLVMCConfigurationEmitter.cpp @@ -632,11 +632,11 @@ void EmitOptionPropertyHandlingCode (const ToolProperties& P, << "::iterator B = " << D.GenVariableName() << ".begin(),\n" << Indent3 << "E = " << D.GenVariableName() << ".end(); B != E; ++B)\n" - << Indent4 << "Tool::UnpackValues(*B, vec);\n"; + << Indent4 << "llvm::SplitString(*B, vec, \",\");\n"; } else if (D.Type == OptionType::Prefix || D.Type == OptionType::Parameter){ - O << Indent3 << "Tool::UnpackValues(" - << D.GenVariableName() << ", vec);\n"; + O << Indent3 << "llvm::SplitString(" + << D.GenVariableName() << ", vec, \",\");\n"; } else { // TOFIX: move this to the type-checking phase