diff options
| author | Owen Anderson <resistor@mac.com> | 2009-07-16 19:05:41 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2009-07-16 19:05:41 +0000 |
| commit | c277dc408bea3697fbaa3429658c4d8deff3f066 (patch) | |
| tree | f65e750a09ae0ea781e0dc379886adaf7be21a77 /llvm/docs/tutorial/LangImpl4.html | |
| parent | bf61e3b4d3fd81eb65c44bd71b6e001127906b98 (diff) | |
| download | bcm5719-llvm-c277dc408bea3697fbaa3429658c4d8deff3f066.tar.gz bcm5719-llvm-c277dc408bea3697fbaa3429658c4d8deff3f066.zip | |
Privatize the ConstantFP table. I'm on a roll!
llvm-svn: 76097
Diffstat (limited to 'llvm/docs/tutorial/LangImpl4.html')
| -rw-r--r-- | llvm/docs/tutorial/LangImpl4.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/docs/tutorial/LangImpl4.html b/llvm/docs/tutorial/LangImpl4.html index f08665d64cd..ca5968273e1 100644 --- a/llvm/docs/tutorial/LangImpl4.html +++ b/llvm/docs/tutorial/LangImpl4.html @@ -869,7 +869,7 @@ static FunctionPassManager *TheFPM; Value *ErrorV(const char *Str) { Error(Str); return 0; } Value *NumberExprAST::Codegen() { - return ConstantFP::get(APFloat(Val)); + return getGlobalContext().getConstantFP(APFloat(Val)); } Value *VariableExprAST::Codegen() { @@ -917,7 +917,7 @@ Value *CallExprAST::Codegen() { Function *PrototypeAST::Codegen() { // Make the function type: double(double,double) etc. std::vector<const Type*> Doubles(Args.size(), Type::DoubleTy); - FunctionType *FT = FunctionType::get(Type::DoubleTy, Doubles, false); + FunctionType *FT = getGlobalContext().getFunctionType(Type::DoubleTy, Doubles, false); Function *F = Function::Create(FT, Function::ExternalLinkage, Name, TheModule); |

