├── .gitignore ├── Chapter_01 ├── README.md ├── __module.sh ├── hello.c ├── hello.cpp ├── llvm-13.sh ├── llvm.sh └── module.cpp ├── Chapter_02 ├── README ├── __constant.sh ├── __function.sh ├── __global_var.sh ├── __local_var.sh ├── __struct.sh ├── arith.cpp ├── constant.cpp ├── constants.cpp ├── constants.sh ├── function.cpp ├── functionArgs.cpp ├── functionBlock.cpp ├── function_block_test.sh ├── function_create.cpp ├── function_create.sh ├── function_test.sh ├── global_var.cpp ├── global_variables.cpp ├── global_variables.sh ├── local_var.cpp ├── local_variable.cpp ├── local_variable.sh ├── module.cpp ├── module_test.cpp ├── return.cpp ├── run_arith.sh ├── run_return.sh ├── struct.c ├── struct.cpp └── struct.sh ├── Chapter_03 ├── ifelse.cpp ├── ifelse.sh ├── ifelse_phi.cpp ├── ifelse_phi.sh ├── loop.1.cpp ├── loop.cpp └── loop.sh ├── Chapter_04 ├── class.cpp ├── class.sh ├── function.c ├── function.ll ├── function_pointer.cpp ├── function_pointer.sh ├── inheritance.cpp ├── inheritance.ll ├── multiple_inheritance.cpp ├── multiple_inheritance.sh ├── single_inheritance.cpp ├── single_inheritance.sh ├── virIht_demo.cpp ├── virIht_demo.ll ├── virIht_demo.sh ├── virtual.cpp ├── virtual.sh ├── virtual_inheritance.cpp ├── virtual_inheritance.sh ├── vptr_demo.cpp ├── vptr_demo.ll └── vptr_demo.sh ├── README.md └── doc ├── Multiple-Inheritance.md ├── class_basic.md ├── constants.md ├── function_create.md ├── function_pointer.md ├── global_variables.md ├── ifelse-alloca.md ├── ifelse-phi.md ├── local_variables.md ├── logo.png ├── loop.md ├── module.md ├── single_inheritance.md ├── struct.md ├── template.md ├── virtual-inheritance.md └── virtual.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.out 2 | -------------------------------------------------------------------------------- /Chapter_01/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_01/README.md -------------------------------------------------------------------------------- /Chapter_01/__module.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_01/__module.sh -------------------------------------------------------------------------------- /Chapter_01/hello.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_01/hello.c -------------------------------------------------------------------------------- /Chapter_01/hello.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_01/hello.cpp -------------------------------------------------------------------------------- /Chapter_01/llvm-13.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_01/llvm-13.sh -------------------------------------------------------------------------------- /Chapter_01/llvm.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_01/llvm.sh -------------------------------------------------------------------------------- /Chapter_01/module.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_01/module.cpp -------------------------------------------------------------------------------- /Chapter_02/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/README -------------------------------------------------------------------------------- /Chapter_02/__constant.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/__constant.sh -------------------------------------------------------------------------------- /Chapter_02/__function.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/__function.sh -------------------------------------------------------------------------------- /Chapter_02/__global_var.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/__global_var.sh -------------------------------------------------------------------------------- /Chapter_02/__local_var.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/__local_var.sh -------------------------------------------------------------------------------- /Chapter_02/__struct.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/__struct.sh -------------------------------------------------------------------------------- /Chapter_02/arith.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/arith.cpp -------------------------------------------------------------------------------- /Chapter_02/constant.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/constant.cpp -------------------------------------------------------------------------------- /Chapter_02/constants.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/constants.cpp -------------------------------------------------------------------------------- /Chapter_02/constants.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/constants.sh -------------------------------------------------------------------------------- /Chapter_02/function.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/function.cpp -------------------------------------------------------------------------------- /Chapter_02/functionArgs.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/functionArgs.cpp -------------------------------------------------------------------------------- /Chapter_02/functionBlock.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/functionBlock.cpp -------------------------------------------------------------------------------- /Chapter_02/function_block_test.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/function_block_test.sh -------------------------------------------------------------------------------- /Chapter_02/function_create.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/function_create.cpp -------------------------------------------------------------------------------- /Chapter_02/function_create.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/function_create.sh -------------------------------------------------------------------------------- /Chapter_02/function_test.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/function_test.sh -------------------------------------------------------------------------------- /Chapter_02/global_var.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/global_var.cpp -------------------------------------------------------------------------------- /Chapter_02/global_variables.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/global_variables.cpp -------------------------------------------------------------------------------- /Chapter_02/global_variables.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/global_variables.sh -------------------------------------------------------------------------------- /Chapter_02/local_var.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/local_var.cpp -------------------------------------------------------------------------------- /Chapter_02/local_variable.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/local_variable.cpp -------------------------------------------------------------------------------- /Chapter_02/local_variable.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/local_variable.sh -------------------------------------------------------------------------------- /Chapter_02/module.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/module.cpp -------------------------------------------------------------------------------- /Chapter_02/module_test.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/module_test.cpp -------------------------------------------------------------------------------- /Chapter_02/return.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/return.cpp -------------------------------------------------------------------------------- /Chapter_02/run_arith.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/run_arith.sh -------------------------------------------------------------------------------- /Chapter_02/run_return.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/run_return.sh -------------------------------------------------------------------------------- /Chapter_02/struct.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/struct.c -------------------------------------------------------------------------------- /Chapter_02/struct.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/struct.cpp -------------------------------------------------------------------------------- /Chapter_02/struct.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_02/struct.sh -------------------------------------------------------------------------------- /Chapter_03/ifelse.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_03/ifelse.cpp -------------------------------------------------------------------------------- /Chapter_03/ifelse.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_03/ifelse.sh -------------------------------------------------------------------------------- /Chapter_03/ifelse_phi.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_03/ifelse_phi.cpp -------------------------------------------------------------------------------- /Chapter_03/ifelse_phi.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_03/ifelse_phi.sh -------------------------------------------------------------------------------- /Chapter_03/loop.1.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_03/loop.1.cpp -------------------------------------------------------------------------------- /Chapter_03/loop.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_03/loop.cpp -------------------------------------------------------------------------------- /Chapter_03/loop.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_03/loop.sh -------------------------------------------------------------------------------- /Chapter_04/class.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/class.cpp -------------------------------------------------------------------------------- /Chapter_04/class.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/class.sh -------------------------------------------------------------------------------- /Chapter_04/function.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/function.c -------------------------------------------------------------------------------- /Chapter_04/function.ll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/function.ll -------------------------------------------------------------------------------- /Chapter_04/function_pointer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/function_pointer.cpp -------------------------------------------------------------------------------- /Chapter_04/function_pointer.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/function_pointer.sh -------------------------------------------------------------------------------- /Chapter_04/inheritance.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/inheritance.cpp -------------------------------------------------------------------------------- /Chapter_04/inheritance.ll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/inheritance.ll -------------------------------------------------------------------------------- /Chapter_04/multiple_inheritance.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/multiple_inheritance.cpp -------------------------------------------------------------------------------- /Chapter_04/multiple_inheritance.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/multiple_inheritance.sh -------------------------------------------------------------------------------- /Chapter_04/single_inheritance.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/single_inheritance.cpp -------------------------------------------------------------------------------- /Chapter_04/single_inheritance.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/single_inheritance.sh -------------------------------------------------------------------------------- /Chapter_04/virIht_demo.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/virIht_demo.cpp -------------------------------------------------------------------------------- /Chapter_04/virIht_demo.ll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/virIht_demo.ll -------------------------------------------------------------------------------- /Chapter_04/virIht_demo.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/virIht_demo.sh -------------------------------------------------------------------------------- /Chapter_04/virtual.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/virtual.cpp -------------------------------------------------------------------------------- /Chapter_04/virtual.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/virtual.sh -------------------------------------------------------------------------------- /Chapter_04/virtual_inheritance.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/virtual_inheritance.cpp -------------------------------------------------------------------------------- /Chapter_04/virtual_inheritance.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/virtual_inheritance.sh -------------------------------------------------------------------------------- /Chapter_04/vptr_demo.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/vptr_demo.cpp -------------------------------------------------------------------------------- /Chapter_04/vptr_demo.ll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/vptr_demo.ll -------------------------------------------------------------------------------- /Chapter_04/vptr_demo.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/Chapter_04/vptr_demo.sh -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/README.md -------------------------------------------------------------------------------- /doc/Multiple-Inheritance.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/doc/Multiple-Inheritance.md -------------------------------------------------------------------------------- /doc/class_basic.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/doc/class_basic.md -------------------------------------------------------------------------------- /doc/constants.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/doc/constants.md -------------------------------------------------------------------------------- /doc/function_create.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/doc/function_create.md -------------------------------------------------------------------------------- /doc/function_pointer.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/doc/function_pointer.md -------------------------------------------------------------------------------- /doc/global_variables.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/doc/global_variables.md -------------------------------------------------------------------------------- /doc/ifelse-alloca.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/doc/ifelse-alloca.md -------------------------------------------------------------------------------- /doc/ifelse-phi.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/doc/ifelse-phi.md -------------------------------------------------------------------------------- /doc/local_variables.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/doc/local_variables.md -------------------------------------------------------------------------------- /doc/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/doc/logo.png -------------------------------------------------------------------------------- /doc/loop.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/doc/loop.md -------------------------------------------------------------------------------- /doc/module.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/doc/module.md -------------------------------------------------------------------------------- /doc/single_inheritance.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/doc/single_inheritance.md -------------------------------------------------------------------------------- /doc/struct.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/doc/struct.md -------------------------------------------------------------------------------- /doc/template.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/doc/template.md -------------------------------------------------------------------------------- /doc/virtual-inheritance.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/doc/virtual-inheritance.md -------------------------------------------------------------------------------- /doc/virtual.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigconvience/llvm-ir-in-action/HEAD/doc/virtual.md --------------------------------------------------------------------------------