Fix a major bug in lli
authorChris Lattner <sabre@nondot.org>
Sat, 26 Oct 2002 01:57:15 +0000 (01:57 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 26 Oct 2002 01:57:15 +0000 (01:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4289 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/Interpreter/Execution.cpp

index 4c8be259835b0c570d13688ee0409bef6bd7955f..9282fe269aa554b53625feea73338b8aacd8ff6e 100644 (file)
@@ -936,7 +936,7 @@ static void StoreValueToMemory(GenericValue Val, GenericValue *Ptr,
                             Ptr->Untyped[7] = (Val.ULongVal >> 56) & 255;
                             break;
     default:
-      cout << "Cannot load value of type " << Ty << "!\n";
+      cout << "Cannot store value of type " << Ty << "!\n";
     }
   } else {
     switch (Ty->getPrimitiveID()) {
@@ -967,7 +967,7 @@ static void StoreValueToMemory(GenericValue Val, GenericValue *Ptr,
                             Ptr->Untyped[0] = (Val.ULongVal >> 56) & 255;
                             break;
     default:
-      cout << "Cannot load value of type " << Ty << "!\n";
+      cout << "Cannot store value of type " << Ty << "!\n";
     }
   }
 }
@@ -975,7 +975,8 @@ static void StoreValueToMemory(GenericValue Val, GenericValue *Ptr,
 static void executeStoreInst(StoreInst &I, ExecutionContext &SF) {
   GenericValue Val = getOperandValue(I.getOperand(0), SF);
   GenericValue SRC = getOperandValue(I.getPointerOperand(), SF);
-  StoreValueToMemory(Val, (GenericValue *)SRC.PointerVal, I.getType());
+  StoreValueToMemory(Val, (GenericValue *)SRC.PointerVal,
+                     I.getOperand(0)->getType());
 }