llvm.org GIT mirror llvm / 34bd70d
Adjust for changes in GenericValue type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34969 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 12 years ago
3 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
111111
112112 // Call the Fibonacci function with argument n:
113113 std::vector Args(1);
114 Args[0].Int32Val = n;
114 Args[0].IntVal = APInt(32, n);
115115 GenericValue GV = EE->runFunction(FibF, Args);
116116
117117 // import result of execution
118 std::cout << "Result: " << GV.Int32Val << "\n";
118 std::cout << "Result: " << GV.IntVal.toString(10) << "\n";
119119 return 0;
120120 }
106106 GenericValue gv = EE->runFunction(FooF, noargs);
107107
108108 // Import result of execution:
109 std::cout << "Result: " << gv.Int32Val << "\n";
109 std::cout << "Result: " << gv.IntVal.toString(10) << "\n";
110110 return 0;
111111 }
220220
221221 // Call the `foo' function with no arguments:
222222 std::vector Args(1);
223 Args[0].Int32Val = p->value;
223 Args[0].IntVal = APInt(32, p->value);
224224
225225 synchronize.block(); // wait until other threads are at this point
226226 GenericValue gv = p->EE->runFunction(p->F, Args);
227227
228 return (void*) intptr_t(gv.Int32Val);
228 return (void*)(intptr_t)gv.IntVal.getZExtValue();
229229 }
230230
231231 int main()