Adjust for changes in GenericValue type.

llvm-svn: 34969
This commit is contained in:
Reid Spencer 2007-03-06 17:24:31 +00:00
parent 84ffc223f1
commit 8a9ae48d53
3 changed files with 5 additions and 5 deletions

View File

@ -112,10 +112,10 @@ int main(int argc, char **argv) {
// Call the Fibonacci function with argument n: // Call the Fibonacci function with argument n:
std::vector<GenericValue> Args(1); std::vector<GenericValue> Args(1);
Args[0].Int32Val = n; Args[0].IntVal = APInt(32, n);
GenericValue GV = EE->runFunction(FibF, Args); GenericValue GV = EE->runFunction(FibF, Args);
// import result of execution // import result of execution
std::cout << "Result: " << GV.Int32Val << "\n"; std::cout << "Result: " << GV.IntVal.toString(10) << "\n";
return 0; return 0;
} }

View File

@ -107,6 +107,6 @@ int main() {
GenericValue gv = EE->runFunction(FooF, noargs); GenericValue gv = EE->runFunction(FooF, noargs);
// Import result of execution: // Import result of execution:
std::cout << "Result: " << gv.Int32Val << "\n"; std::cout << "Result: " << gv.IntVal.toString(10) << "\n";
return 0; return 0;
} }

View File

@ -221,12 +221,12 @@ void* callFunc( void* param )
// Call the `foo' function with no arguments: // Call the `foo' function with no arguments:
std::vector<GenericValue> Args(1); std::vector<GenericValue> Args(1);
Args[0].Int32Val = p->value; Args[0].IntVal = APInt(32, p->value);
synchronize.block(); // wait until other threads are at this point synchronize.block(); // wait until other threads are at this point
GenericValue gv = p->EE->runFunction(p->F, Args); GenericValue gv = p->EE->runFunction(p->F, Args);
return (void*) intptr_t(gv.Int32Val); return (void*)(intptr_t)gv.IntVal.getZExtValue();
} }
int main() int main()