Skip to content

Commit

Permalink
Adjust for changes in GenericValue type.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34969 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Reid Spencer committed Mar 6, 2007
1 parent a5057d0 commit 34bd70d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/Fibonacci/fibonacci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ int main(int argc, char **argv) {

// Call the Fibonacci function with argument n:
std::vector<GenericValue> Args(1);
Args[0].Int32Val = n;
Args[0].IntVal = APInt(32, n);
GenericValue GV = EE->runFunction(FibF, Args);

// import result of execution
std::cout << "Result: " << GV.Int32Val << "\n";
std::cout << "Result: " << GV.IntVal.toString(10) << "\n";
return 0;
}
2 changes: 1 addition & 1 deletion examples/HowToUseJIT/HowToUseJIT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,6 @@ int main() {
GenericValue gv = EE->runFunction(FooF, noargs);

// Import result of execution:
std::cout << "Result: " << gv.Int32Val << "\n";
std::cout << "Result: " << gv.IntVal.toString(10) << "\n";
return 0;
}
4 changes: 2 additions & 2 deletions examples/ParallelJIT/ParallelJIT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@ void* callFunc( void* param )

// Call the `foo' function with no arguments:
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
GenericValue gv = p->EE->runFunction(p->F, Args);

return (void*) intptr_t(gv.Int32Val);
return (void*)(intptr_t)gv.IntVal.getZExtValue();
}

int main()
Expand Down

0 comments on commit 34bd70d

Please sign in to comment.