llvm.org GIT mirror llvm / d83038c
Remove the UnpackValues() function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50756 91177308-0d34-0410-b5e6-96231b3b80d8 Mikhail Glushenkov 11 years ago
4 changed file(s) with 4 addition(s) and 30 deletion(s). Raw diff Collapse all Expand all
1414 #include "CompilationGraph.h"
1515 #include "Tool.h"
1616
17 #include "llvm/ADT/StringExtras.h"
1718 #include "llvm/Support/CommandLine.h"
1819
1920 #include
+0
-21
tools/llvmc2/Tool.cpp less more
None //===--- Tools.cpp - The LLVM Compiler Driver -------------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open
5 // Source License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Tool abstract base class - implementation of the auxiliary functions.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "Tool.h"
14
15 #include "llvm/ADT/StringExtras.h"
16
17 void llvmc::Tool::UnpackValues (const std::string& from,
18 std::vector& to) {
19 llvm::SplitString(from, to, ",");
20 }
4343
4444 virtual bool IsLast() const = 0;
4545 virtual bool IsJoin() const = 0;
46
47 // Helper function that is called by the auto-generated code
48 // Splits strings of the form ",-foo,-bar,-baz"
49 // TOFIX: find a better name
50 static void UnpackValues (std::string const& from,
51 std::vector& to);
5246 };
5347
5448 // Join tools have an input file list associated with them.
631631 << "::iterator B = " << D.GenVariableName() << ".begin(),\n"
632632 << Indent3 << "E = " << D.GenVariableName()
633633 << ".end(); B != E; ++B)\n"
634 << Indent4 << "Tool::UnpackValues(*B, vec);\n";
634 << Indent4 << "llvm::SplitString(*B, vec, \",\");\n";
635635 }
636636 else if (D.Type == OptionType::Prefix || D.Type == OptionType::Parameter){
637 O << Indent3 << "Tool::UnpackValues("
638 << D.GenVariableName() << ", vec);\n";
637 O << Indent3 << "llvm::SplitString("
638 << D.GenVariableName() << ", vec, \",\");\n";
639639 }
640640 else {
641641 // TOFIX: move this to the type-checking phase