Fixes to compile with GCC 3.2
authorChris Lattner <sabre@nondot.org>
Tue, 24 Dec 2002 00:39:16 +0000 (00:39 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 24 Dec 2002 00:39:16 +0000 (00:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5134 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/ExecutionEngine.cpp
tools/lli/lli.cpp

index 996afe475d4d0eb0119d6185b10ab47e5d8e0e1a..456f68244afd9d52444534fa3e8523fea7e53df7 100644 (file)
@@ -56,7 +56,7 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
     }
     break;
   default:
-    cout << "ERROR: Constant unimp for type: " << C->getType() << "\n";
+    std::cout << "ERROR: Constant unimp for type: " << C->getType() << "\n";
   }
   return Result;
 }
@@ -92,7 +92,7 @@ void ExecutionEngine::StoreValueToMemory(GenericValue Val, GenericValue *Ptr,
                             Ptr->Untyped[7] = (Val.ULongVal >> 56) & 255;
                             break;
     default:
-      cout << "Cannot store value of type " << Ty << "!\n";
+      std::cout << "Cannot store value of type " << Ty << "!\n";
     }
   } else {
     switch (Ty->getPrimitiveID()) {
@@ -123,7 +123,7 @@ void ExecutionEngine::StoreValueToMemory(GenericValue Val, GenericValue *Ptr,
                             Ptr->Untyped[0] = (Val.ULongVal >> 56) & 255;
                             break;
     default:
-      cout << "Cannot store value of type " << Ty << "!\n";
+      std::cout << "Cannot store value of type " << Ty << "!\n";
     }
   }
 }
@@ -141,7 +141,7 @@ void ExecutionEngine::InitializeMemory(const Constant *Init, void *Addr) {
   switch (Init->getType()->getPrimitiveID()) {
   case Type::ArrayTyID: {
     const ConstantArray *CPA = cast<ConstantArray>(Init);
-    const vector<Use> &Val = CPA->getValues();
+    const std::vector<Use> &Val = CPA->getValues();
     unsigned ElementSize = 
       getTargetData().getTypeSize(cast<ArrayType>(CPA->getType())->getElementType());
     for (unsigned i = 0; i < Val.size(); ++i)
@@ -153,7 +153,7 @@ void ExecutionEngine::InitializeMemory(const Constant *Init, void *Addr) {
     const ConstantStruct *CPS = cast<ConstantStruct>(Init);
     const StructLayout *SL =
       getTargetData().getStructLayout(cast<StructType>(CPS->getType()));
-    const vector<Use> &Val = CPS->getValues();
+    const std::vector<Use> &Val = CPS->getValues();
     for (unsigned i = 0; i < Val.size(); ++i)
       InitializeMemory(cast<Constant>(Val[i].get()),
                        (char*)Addr+SL->MemberOffsets[i]);
index be6ed11794fc18108edb6d152b892d62d66be12d..73052c0709071d7338b0372dc70575ba6770f6f7 100644 (file)
@@ -51,17 +51,17 @@ int main(int argc, char** argv) {
                              " llvm interpreter & dynamic compiler\n");
 
   // Load the bytecode...
-  string ErrorMsg;
+  std::string ErrorMsg;
   Module *M = ParseBytecodeFile(InputFile, &ErrorMsg);
   if (M == 0) {
-    cout << "Error parsing '" << InputFile << "': "
-         << ErrorMsg << "\n";
+    std::cout << "Error parsing '" << InputFile << "': "
+              << ErrorMsg << "\n";
     exit(1);
   }
 
 #if 0
   // Link in the runtime library for LLI...
-  string RuntimeLib = getCurrentExecutablePath();
+  std::string RuntimeLib = getCurrentExecutablePath();
   if (!RuntimeLib.empty()) RuntimeLib += "/";
   RuntimeLib += "RuntimeLib.bc";