From 697954c15da58bd8b186dbafdedd8b06db770201 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 20 Jan 2002 22:54:45 +0000 Subject: Changes to build successfully with GCC 3.02 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/Interpreter/Support.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'lib/ExecutionEngine/Interpreter/Support.cpp') diff --git a/lib/ExecutionEngine/Interpreter/Support.cpp b/lib/ExecutionEngine/Interpreter/Support.cpp index a619304c62..ca89ae3333 100644 --- a/lib/ExecutionEngine/Interpreter/Support.cpp +++ b/lib/ExecutionEngine/Interpreter/Support.cpp @@ -7,13 +7,15 @@ #include "Interpreter.h" #include "llvm/SymbolTable.h" #include "llvm/Assembly/Writer.h" +#include +using std::cout; //===----------------------------------------------------------------------===// // // LookupMatchingNames helper - Search a symbol table for values matching Name. // -static inline void LookupMatchingNames(const string &Name, SymTabValue &STV, - vector &Results) { +static inline void LookupMatchingNames(const std::string &Name,SymTabValue &STV, + std::vector &Results) { SymbolTable *SymTab = STV.getSymbolTable(); if (SymTab == 0) return; // No symbolic values :( @@ -34,8 +36,8 @@ static inline void LookupMatchingNames(const string &Name, SymTabValue &STV, // matches to that name. This is obviously slow, and should only be used for // user interaction. // -vector Interpreter::LookupMatchingNames(const string &Name) { - vector Results; +std::vector Interpreter::LookupMatchingNames(const std::string &Name) { + std::vector Results; Method *CurMeth = getCurrentMethod(); if (CurMeth) ::LookupMatchingNames(Name, *CurMeth, Results); @@ -47,8 +49,8 @@ vector Interpreter::LookupMatchingNames(const string &Name) { // pick one value. If no options are provided, emit an error. If a single // option is provided, just return that option. // -Value *Interpreter::ChooseOneOption(const string &Name, - const vector &Opts) { +Value *Interpreter::ChooseOneOption(const std::string &Name, + const std::vector &Opts) { switch (Opts.size()) { case 1: return Opts[0]; case 0: @@ -61,16 +63,16 @@ Value *Interpreter::ChooseOneOption(const string &Name, cout << " 0. Cancel operation\n"; for (unsigned i = 0; i < Opts.size(); ++i) { cout << " " << (i+1) << "."; - WriteAsOperand(cout, Opts[i]) << endl; + WriteAsOperand(cout, Opts[i]) << "\n"; } unsigned Option; do { - cout << "lli> " << flush; - cin >> Option; + cout << "lli> " << std::flush; + std::cin >> Option; if (Option > Opts.size()) cout << "Invalid selection: Please choose from 0 to " << Opts.size() - << endl; + << "\n"; } while (Option > Opts.size()); if (Option == 0) return 0; -- cgit v1.2.3-18-g5258