Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is LLVM Context?

Tags:

llvm

What is actually the LLVM Context? Is it the environment such as bitsize in which the code runs? What are the mwmbers of LLVMContext class? I went through http://llvm.org/docs/doxygen/html/classllvm_1_1LLVMContext.html . But Couldn't understand much.

like image 471
ViG Avatar asked Nov 01 '12 20:11

ViG


1 Answers

From the link you included:

This is an important class for using LLVM in a threaded context. It (opaquely) owns and manages the core "global" data of LLVM's core infrastructure, including the type and constant uniquing tables.

Since it says "opaquely" you're not supposed to know what it contains, what it does or what's used for. Just think of it as a reference to the core LLVM "engine" that you should pass to the various methods that require a LLVMContext.

edit: just to clarify: no, it doesn't contain things such as bitsize - those are defined in TargetData.

like image 56
CAFxX Avatar answered Oct 16 '22 11:10

CAFxX