summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-27 20:59:43 +0000
committerOwen Anderson <resistor@mac.com>2009-07-27 20:59:43 +0000
commit6f83c9c6ef0e7f79825a0a8f22941815e4b684c7 (patch)
treea6b206cab778933e7ebb35788fc3b41e47b57c7c /docs
parent9a31254d0e51cfe08bc0e0c63ea04780cbc776f4 (diff)
downloadllvm-6f83c9c6ef0e7f79825a0a8f22941815e4b684c7.tar.gz
llvm-6f83c9c6ef0e7f79825a0a8f22941815e4b684c7.tar.bz2
llvm-6f83c9c6ef0e7f79825a0a8f22941815e4b684c7.tar.xz
Move ConstantFP construction back to the 2.5-ish API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77247 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/tutorial/LangImpl3.html4
-rw-r--r--docs/tutorial/LangImpl4.html2
-rw-r--r--docs/tutorial/LangImpl5.html14
-rw-r--r--docs/tutorial/LangImpl6.html8
-rw-r--r--docs/tutorial/LangImpl7.html12
5 files changed, 20 insertions, 20 deletions
diff --git a/docs/tutorial/LangImpl3.html b/docs/tutorial/LangImpl3.html
index 5031427a7b..c56b1edac6 100644
--- a/docs/tutorial/LangImpl3.html
+++ b/docs/tutorial/LangImpl3.html
@@ -159,7 +159,7 @@ we'll do numeric literals:</p>
<div class="doc_code">
<pre>
Value *NumberExprAST::Codegen() {
- return getGlobalContext().getConstantFP(APFloat(Val));
+ return ConstantFP::get(getGlobalContext(), APFloat(Val));
}
</pre>
</div>
@@ -1034,7 +1034,7 @@ static std::map&lt;std::string, Value*&gt; NamedValues;
Value *ErrorV(const char *Str) { Error(Str); return 0; }
Value *NumberExprAST::Codegen() {
- return getGlobalContext().getConstantFP(APFloat(Val));
+ return ConstantFP::get(getGlobalContext(), APFloat(Val));
}
Value *VariableExprAST::Codegen() {
diff --git a/docs/tutorial/LangImpl4.html b/docs/tutorial/LangImpl4.html
index 41f3a2cd85..45002d29ea 100644
--- a/docs/tutorial/LangImpl4.html
+++ b/docs/tutorial/LangImpl4.html
@@ -869,7 +869,7 @@ static FunctionPassManager *TheFPM;
Value *ErrorV(const char *Str) { Error(Str); return 0; }
Value *NumberExprAST::Codegen() {
- return getGlobalContext().getConstantFP(APFloat(Val));
+ return ConstantFP::get(getGlobalContext(), APFloat(Val));
}
Value *VariableExprAST::Codegen() {
diff --git a/docs/tutorial/LangImpl5.html b/docs/tutorial/LangImpl5.html
index a783c4abbd..62a0dd9739 100644
--- a/docs/tutorial/LangImpl5.html
+++ b/docs/tutorial/LangImpl5.html
@@ -364,7 +364,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");
</pre>
</div>
@@ -796,7 +796,7 @@ references to it will naturally find it in the symbol table.</p>
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));
}
Value *NextVar = Builder.CreateAdd(Variable, StepVal, "nextvar");
@@ -815,7 +815,7 @@ will be the value of the loop variable on the next iteration of the loop.</p>
// 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");
</pre>
</div>
@@ -1360,7 +1360,7 @@ static FunctionPassManager *TheFPM;
Value *ErrorV(const char *Str) { Error(Str); return 0; }
Value *NumberExprAST::Codegen() {
- return getGlobalContext().getConstantFP(APFloat(Val));
+ return ConstantFP::get(getGlobalContext(), APFloat(Val));
}
Value *VariableExprAST::Codegen() {
@@ -1411,7 +1411,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()-&gt;getParent();
@@ -1510,7 +1510,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));
}
Value *NextVar = Builder.CreateAdd(Variable, StepVal, "nextvar");
@@ -1521,7 +1521,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.
diff --git a/docs/tutorial/LangImpl6.html b/docs/tutorial/LangImpl6.html
index 1933d71c06..5a553b7b8a 100644
--- a/docs/tutorial/LangImpl6.html
+++ b/docs/tutorial/LangImpl6.html
@@ -1365,7 +1365,7 @@ static FunctionPassManager *TheFPM;
Value *ErrorV(const char *Str) { Error(Str); return 0; }
Value *NumberExprAST::Codegen() {
- return getGlobalContext().getConstantFP(APFloat(Val));
+ return ConstantFP::get(getGlobalContext(), APFloat(Val));
}
Value *VariableExprAST::Codegen() {
@@ -1436,7 +1436,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()-&gt;getParent();
@@ -1535,7 +1535,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));
}
Value *NextVar = Builder.CreateAdd(Variable, StepVal, "nextvar");
@@ -1546,7 +1546,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.
diff --git a/docs/tutorial/LangImpl7.html b/docs/tutorial/LangImpl7.html
index 07c8da653c..d3ebd962c5 100644
--- a/docs/tutorial/LangImpl7.html
+++ b/docs/tutorial/LangImpl7.html
@@ -923,7 +923,7 @@ that we replace in OldBindings.</p>
InitVal = Init-&gt;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()-&gt;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-&gt;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);