Remove the UnpackValues() function.
authorMikhail Glushenkov <foldr@codedgers.com>
Tue, 6 May 2008 18:13:45 +0000 (18:13 +0000)
committerMikhail Glushenkov <foldr@codedgers.com>
Tue, 6 May 2008 18:13:45 +0000 (18:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50756 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvmc2/AutoGenerated.cpp
tools/llvmc2/Tool.cpp [deleted file]
tools/llvmc2/Tool.h
utils/TableGen/LLVMCConfigurationEmitter.cpp

index 9b0255cefc81b471cfd00b86b740fb85b7ec24aa..e01702653aa495ded23d765068772e0fefd1a0ff 100644 (file)
@@ -15,6 +15,7 @@
 #include "CompilationGraph.h"
 #include "Tool.h"
 
+#include "llvm/ADT/StringExtras.h"
 #include "llvm/Support/CommandLine.h"
 
 #include <stdexcept>
diff --git a/tools/llvmc2/Tool.cpp b/tools/llvmc2/Tool.cpp
deleted file mode 100644 (file)
index eea0145..0000000
+++ /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<std::string>& to) {
-  llvm::SplitString(from, to, ",");
-}
index 1cac7eed6978c62e6f9b35d9e96e4cee79bb682d..122c887ca9e61d29b604de05d8aee6a8e17d6d69 100644 (file)
@@ -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<std::string>& to);
   };
 
   // Join tools have an input file list associated with them.
index 32b6d3832888872f8684bf9c0e20e56f5cb53f99..ab6f2efc484072e4da5f1d16f397e9d51a3e7259 100644 (file)
@@ -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