diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-27 20:59:43 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-27 20:59:43 +0000 |
commit | 69c464dec4795af43b4a432bae2b329ee5f1bef5 (patch) | |
tree | 3e3a64f042f90003a35e4cc3a91386fe47c1d11c /llvm/docs/tutorial/LangImpl7.html | |
parent | 7b2b1ec6b1a573c7b5909bb082ff27766774db80 (diff) | |
download | bcm5719-llvm-69c464dec4795af43b4a432bae2b329ee5f1bef5.tar.gz bcm5719-llvm-69c464dec4795af43b4a432bae2b329ee5f1bef5.zip |
Move ConstantFP construction back to the 2.5-ish API.
llvm-svn: 77247
Diffstat (limited to 'llvm/docs/tutorial/LangImpl7.html')
-rw-r--r-- | llvm/docs/tutorial/LangImpl7.html | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/docs/tutorial/LangImpl7.html b/llvm/docs/tutorial/LangImpl7.html index 07c8da653c7..d3ebd962c5c 100644 --- a/llvm/docs/tutorial/LangImpl7.html +++ b/llvm/docs/tutorial/LangImpl7.html @@ -923,7 +923,7 @@ that we replace in OldBindings.</p> InitVal = Init->Codegen(); if (InitVal == 0) return 0; } else { // If not specified, use 0.0. - InitVal = getGlobalContext().getConstantFP(APFloat(0.0)); + InitVal = ConstantFP::get(getGlobalContext(), APFloat(0.0)); } AllocaInst *Alloca = CreateEntryBlockAlloca(TheFunction, VarName); @@ -1623,7 +1623,7 @@ static AllocaInst *CreateEntryBlockAlloca(Function *TheFunction, Value *NumberExprAST::Codegen() { - return getGlobalContext().getConstantFP(APFloat(Val)); + return ConstantFP::get(getGlobalContext(), APFloat(Val)); } Value *VariableExprAST::Codegen() { @@ -1716,7 +1716,7 @@ Value *IfExprAST::Codegen() { // Convert condition to a bool by comparing equal to 0.0. CondV = Builder.CreateFCmpONE(CondV, - getGlobalContext().getConstantFP(APFloat(0.0)), + ConstantFP::get(getGlobalContext(), APFloat(0.0)), "ifcond"); Function *TheFunction = Builder.GetInsertBlock()->getParent(); @@ -1822,7 +1822,7 @@ Value *ForExprAST::Codegen() { if (StepVal == 0) return 0; } else { // If not specified, use 1.0. - StepVal = getGlobalContext().getConstantFP(APFloat(1.0)); + StepVal = ConstantFP::get(getGlobalContext(), APFloat(1.0)); } // Compute the end condition. @@ -1837,7 +1837,7 @@ Value *ForExprAST::Codegen() { // Convert condition to a bool by comparing equal to 0.0. EndCond = Builder.CreateFCmpONE(EndCond, - getGlobalContext().getConstantFP(APFloat(0.0)), + ConstantFP::get(getGlobalContext(), APFloat(0.0)), "loopcond"); // Create the "after loop" block and insert it. @@ -1881,7 +1881,7 @@ Value *VarExprAST::Codegen() { InitVal = Init->Codegen(); if (InitVal == 0) return 0; } else { // If not specified, use 0.0. - InitVal = getGlobalContext().getConstantFP(APFloat(0.0)); + InitVal = ConstantFP::get(getGlobalContext(), APFloat(0.0)); } AllocaInst *Alloca = CreateEntryBlockAlloca(TheFunction, VarName); |