summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-03-06 17:24:31 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-03-06 17:24:31 +0000
commit34bd70de3c344034b82dc9a964a6b6893efa3e82 (patch)
tree00112f6375966e97a242a73080101ae56f7d6286 /examples
parenta5057d02c05efc0ead8787c76a012382ef675b03 (diff)
downloadllvm-34bd70de3c344034b82dc9a964a6b6893efa3e82.tar.gz
llvm-34bd70de3c344034b82dc9a964a6b6893efa3e82.tar.bz2
llvm-34bd70de3c344034b82dc9a964a6b6893efa3e82.tar.xz
Adjust for changes in GenericValue type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34969 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples')
-rw-r--r--examples/Fibonacci/fibonacci.cpp4
-rw-r--r--examples/HowToUseJIT/HowToUseJIT.cpp2
-rw-r--r--examples/ParallelJIT/ParallelJIT.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/examples/Fibonacci/fibonacci.cpp b/examples/Fibonacci/fibonacci.cpp
index 53ec1b04d3..cd35417fb3 100644
--- a/examples/Fibonacci/fibonacci.cpp
+++ b/examples/Fibonacci/fibonacci.cpp
@@ -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;
}
diff --git a/examples/HowToUseJIT/HowToUseJIT.cpp b/examples/HowToUseJIT/HowToUseJIT.cpp
index 8948b3ab1a..621621dc46 100644
--- a/examples/HowToUseJIT/HowToUseJIT.cpp
+++ b/examples/HowToUseJIT/HowToUseJIT.cpp
@@ -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;
}
diff --git a/examples/ParallelJIT/ParallelJIT.cpp b/examples/ParallelJIT/ParallelJIT.cpp
index f92055830d..31cadc34f1 100644
--- a/examples/ParallelJIT/ParallelJIT.cpp
+++ b/examples/ParallelJIT/ParallelJIT.cpp
@@ -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()