diff options
author | Shih-wei Liao <sliao@google.com> | 2010-04-07 12:21:42 -0700 |
---|---|---|
committer | Shih-wei Liao <sliao@google.com> | 2010-04-07 12:21:42 -0700 |
commit | e4454320b3cfffe926a487c33fbeb454366de2f8 (patch) | |
tree | 133c05da684edf4a3b2529bcacfa996298c455f6 /docs/tutorial/LangImpl7.html | |
parent | 20570085304f0a4ab4f112a01d77958bbd2827a1 (diff) | |
download | external_llvm-e4454320b3cfffe926a487c33fbeb454366de2f8.zip external_llvm-e4454320b3cfffe926a487c33fbeb454366de2f8.tar.gz external_llvm-e4454320b3cfffe926a487c33fbeb454366de2f8.tar.bz2 |
libbcc
Change-Id: Ieaa3ebd5a38f370752495549f8870b534eeedfc5
Diffstat (limited to 'docs/tutorial/LangImpl7.html')
-rw-r--r-- | docs/tutorial/LangImpl7.html | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/docs/tutorial/LangImpl7.html b/docs/tutorial/LangImpl7.html index 30342c3..9d67e6b 100644 --- a/docs/tutorial/LangImpl7.html +++ b/docs/tutorial/LangImpl7.html @@ -557,12 +557,12 @@ then: ; preds = %entry else: ; preds = %entry <b>%x3 = load double* %x1</b> - %subtmp = sub double %x3, 1.000000e+00 + %subtmp = fsub double %x3, 1.000000e+00 %calltmp = call double @fib( double %subtmp ) <b>%x4 = load double* %x1</b> - %subtmp5 = sub double %x4, 2.000000e+00 + %subtmp5 = fsub double %x4, 2.000000e+00 %calltmp6 = call double @fib( double %subtmp5 ) - %addtmp = add double %calltmp, %calltmp6 + %addtmp = fadd double %calltmp, %calltmp6 br label %ifcont ifcont: ; preds = %else, %then @@ -595,11 +595,11 @@ then: br label %ifcont else: - %subtmp = sub double <b>%x</b>, 1.000000e+00 + %subtmp = fsub double <b>%x</b>, 1.000000e+00 %calltmp = call double @fib( double %subtmp ) - %subtmp5 = sub double <b>%x</b>, 2.000000e+00 + %subtmp5 = fsub double <b>%x</b>, 2.000000e+00 %calltmp6 = call double @fib( double %subtmp5 ) - %addtmp = add double %calltmp, %calltmp6 + %addtmp = fadd double %calltmp, %calltmp6 br label %ifcont ifcont: ; preds = %else, %then @@ -625,11 +625,11 @@ entry: br i1 %ifcond, label %else, label %ifcont else: - %subtmp = sub double %x, 1.000000e+00 + %subtmp = fsub double %x, 1.000000e+00 %calltmp = call double @fib( double %subtmp ) - %subtmp5 = sub double %x, 2.000000e+00 + %subtmp5 = fsub double %x, 2.000000e+00 %calltmp6 = call double @fib( double %subtmp5 ) - %addtmp = add double %calltmp, %calltmp6 + %addtmp = fadd double %calltmp, %calltmp6 ret double %addtmp ifcont: @@ -1004,7 +1004,6 @@ variables and var/in support. To build this example, use: <pre> #include "llvm/DerivedTypes.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" -#include "llvm/ExecutionEngine/Interpreter.h" #include "llvm/ExecutionEngine/JIT.h" #include "llvm/LLVMContext.h" #include "llvm/Module.h" @@ -2105,7 +2104,12 @@ int main() { TheModule = new Module("my cool jit", Context); // Create the JIT. This takes ownership of the module. - TheExecutionEngine = EngineBuilder(TheModule).create(); + std::string ErrStr; + TheExecutionEngine = EngineBuilder(TheModule).setErrorStr(&ErrStr).create(); + if (!TheExecutionEngine) { + fprintf(stderr, "Could not create ExecutionEngine: %s\n", ErrStr.c_str()); + exit(1); + } FunctionPassManager OurFPM(TheModule); @@ -2154,7 +2158,7 @@ int main() { <a href="mailto:sabre@nondot.org">Chris Lattner</a><br> <a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br> - Last modified: $Date: 2010-02-03 09:27:31 -0800 (Wed, 03 Feb 2010) $ + Last modified: $Date: 2010-03-02 09:11:08 +0800 (二, 02 3月 2010) $ </address> </body> </html> |