[llvm-commits] [llvm] r50756 - in /llvm/trunk: tools/llvmc2/AutoGenerated.cpp tools/llvmc2/Tool.cpp tools/llvmc2/Tool.h utils/TableGen/LLVMCConfigurationEmitter.cpp

Mikhail Glushenkov foldr at codedgers.com
Tue May 6 11:13:45 PDT 2008


Author: foldr
Date: Tue May  6 13:13:45 2008
New Revision: 50756

URL: http://llvm.org/viewvc/llvm-project?rev=50756&view=rev
Log:
Remove the UnpackValues() function.

Removed:
    llvm/trunk/tools/llvmc2/Tool.cpp
Modified:
    llvm/trunk/tools/llvmc2/AutoGenerated.cpp
    llvm/trunk/tools/llvmc2/Tool.h
    llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp

Modified: llvm/trunk/tools/llvmc2/AutoGenerated.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/AutoGenerated.cpp?rev=50756&r1=50755&r2=50756&view=diff

==============================================================================
--- llvm/trunk/tools/llvmc2/AutoGenerated.cpp (original)
+++ llvm/trunk/tools/llvmc2/AutoGenerated.cpp Tue May  6 13:13:45 2008
@@ -15,6 +15,7 @@
 #include "CompilationGraph.h"
 #include "Tool.h"
 
+#include "llvm/ADT/StringExtras.h"
 #include "llvm/Support/CommandLine.h"
 
 #include <stdexcept>

Removed: llvm/trunk/tools/llvmc2/Tool.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/Tool.cpp?rev=50755&view=auto

==============================================================================
--- llvm/trunk/tools/llvmc2/Tool.cpp (original)
+++ llvm/trunk/tools/llvmc2/Tool.cpp (removed)
@@ -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, ",");
-}

Modified: llvm/trunk/tools/llvmc2/Tool.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/Tool.h?rev=50756&r1=50755&r2=50756&view=diff

==============================================================================
--- llvm/trunk/tools/llvmc2/Tool.h (original)
+++ llvm/trunk/tools/llvmc2/Tool.h Tue May  6 13:13:45 2008
@@ -44,12 +44,6 @@
 
     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.

Modified: llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp?rev=50756&r1=50755&r2=50756&view=diff

==============================================================================
--- llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp Tue May  6 13:13:45 2008
@@ -632,11 +632,11 @@
         << "::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





More information about the llvm-commits mailing list