llvm.org GIT mirror llvm / d071845
fix some out of date prose dating from the LLVMContext changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96500 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 9 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
169169 constants of Arbitrary Precision). This code basically just
170170 creates and returns a ConstantFP. Note that in the LLVM IR
171171 that constants are all uniqued together and shared. For this reason, the API
172 uses "the Context.get..." idiom instead of "new foo(..)" or "foo::Create(..)".

172 uses the "foo::get(...)" idiom instead of "new foo(..)" or "foo::Create(..)".

173173
174174
175175

                  
                
322322 by an expression), it makes sense for it to return the LLVM Function it
323323 corresponds to when codegen'd.

324324
325

The call to Context.get creates

325

The call to FunctionType::get creates

326326 the FunctionType that should be used for a given Prototype. Since all
327327 function arguments in Kaleidoscope are of type double, the first line creates
328 a vector of "N" LLVM double types. It then uses the Context.get
328 a vector of "N" LLVM double types. It then uses the Functiontype::get
329329 method to create a function type that takes "N" doubles as arguments, returns
330330 one double as a result, and that is not vararg (the false parameter indicates
331331 this). Note that Types in LLVM are uniqued just like Constants are, so you