mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-31 15:53:42 +00:00
adjust calls to ConstantFP::get to new API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52165 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c5b822b5b6
commit
5934adf9bb
@ -159,7 +159,7 @@ we'll do numeric literals:</p>
|
||||
<div class="doc_code">
|
||||
<pre>
|
||||
Value *NumberExprAST::Codegen() {
|
||||
return ConstantFP::get(Type::DoubleTy, APFloat(Val));
|
||||
return ConstantFP::get(APFloat(Val));
|
||||
}
|
||||
</pre>
|
||||
</div>
|
||||
@ -1033,7 +1033,7 @@ static std::map<std::string, Value*> NamedValues;
|
||||
Value *ErrorV(const char *Str) { Error(Str); return 0; }
|
||||
|
||||
Value *NumberExprAST::Codegen() {
|
||||
return ConstantFP::get(Type::DoubleTy, APFloat(Val));
|
||||
return ConstantFP::get(APFloat(Val));
|
||||
}
|
||||
|
||||
Value *VariableExprAST::Codegen() {
|
||||
|
@ -863,7 +863,7 @@ static FunctionPassManager *TheFPM;
|
||||
Value *ErrorV(const char *Str) { Error(Str); return 0; }
|
||||
|
||||
Value *NumberExprAST::Codegen() {
|
||||
return ConstantFP::get(Type::DoubleTy, APFloat(Val));
|
||||
return ConstantFP::get(APFloat(Val));
|
||||
}
|
||||
|
||||
Value *VariableExprAST::Codegen() {
|
||||
|
@ -364,7 +364,7 @@ Value *IfExprAST::Codegen() {
|
||||
|
||||
// Convert condition to a bool by comparing equal to 0.0.
|
||||
CondV = Builder.CreateFCmpONE(CondV,
|
||||
ConstantFP::get(Type::DoubleTy, APFloat(0.0)),
|
||||
ConstantFP::get(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 = ConstantFP::get(Type::DoubleTy, APFloat(1.0));
|
||||
StepVal = ConstantFP::get(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,
|
||||
ConstantFP::get(Type::DoubleTy, APFloat(0.0)),
|
||||
ConstantFP::get(APFloat(0.0)),
|
||||
"loopcond");
|
||||
</pre>
|
||||
</div>
|
||||
@ -1359,7 +1359,7 @@ static FunctionPassManager *TheFPM;
|
||||
Value *ErrorV(const char *Str) { Error(Str); return 0; }
|
||||
|
||||
Value *NumberExprAST::Codegen() {
|
||||
return ConstantFP::get(Type::DoubleTy, APFloat(Val));
|
||||
return ConstantFP::get(APFloat(Val));
|
||||
}
|
||||
|
||||
Value *VariableExprAST::Codegen() {
|
||||
@ -1410,7 +1410,7 @@ Value *IfExprAST::Codegen() {
|
||||
|
||||
// Convert condition to a bool by comparing equal to 0.0.
|
||||
CondV = Builder.CreateFCmpONE(CondV,
|
||||
ConstantFP::get(Type::DoubleTy, APFloat(0.0)),
|
||||
ConstantFP::get(APFloat(0.0)),
|
||||
"ifcond");
|
||||
|
||||
Function *TheFunction = Builder.GetInsertBlock()->getParent();
|
||||
@ -1509,7 +1509,7 @@ Value *ForExprAST::Codegen() {
|
||||
if (StepVal == 0) return 0;
|
||||
} else {
|
||||
// If not specified, use 1.0.
|
||||
StepVal = ConstantFP::get(Type::DoubleTy, APFloat(1.0));
|
||||
StepVal = ConstantFP::get(APFloat(1.0));
|
||||
}
|
||||
|
||||
Value *NextVar = Builder.CreateAdd(Variable, StepVal, "nextvar");
|
||||
@ -1520,7 +1520,7 @@ Value *ForExprAST::Codegen() {
|
||||
|
||||
// Convert condition to a bool by comparing equal to 0.0.
|
||||
EndCond = Builder.CreateFCmpONE(EndCond,
|
||||
ConstantFP::get(Type::DoubleTy, APFloat(0.0)),
|
||||
ConstantFP::get(APFloat(0.0)),
|
||||
"loopcond");
|
||||
|
||||
// Create the "after loop" block and insert it.
|
||||
|
@ -1364,7 +1364,7 @@ static FunctionPassManager *TheFPM;
|
||||
Value *ErrorV(const char *Str) { Error(Str); return 0; }
|
||||
|
||||
Value *NumberExprAST::Codegen() {
|
||||
return ConstantFP::get(Type::DoubleTy, APFloat(Val));
|
||||
return ConstantFP::get(APFloat(Val));
|
||||
}
|
||||
|
||||
Value *VariableExprAST::Codegen() {
|
||||
@ -1435,7 +1435,7 @@ Value *IfExprAST::Codegen() {
|
||||
|
||||
// Convert condition to a bool by comparing equal to 0.0.
|
||||
CondV = Builder.CreateFCmpONE(CondV,
|
||||
ConstantFP::get(Type::DoubleTy, APFloat(0.0)),
|
||||
ConstantFP::get(APFloat(0.0)),
|
||||
"ifcond");
|
||||
|
||||
Function *TheFunction = Builder.GetInsertBlock()->getParent();
|
||||
@ -1534,7 +1534,7 @@ Value *ForExprAST::Codegen() {
|
||||
if (StepVal == 0) return 0;
|
||||
} else {
|
||||
// If not specified, use 1.0.
|
||||
StepVal = ConstantFP::get(Type::DoubleTy, APFloat(1.0));
|
||||
StepVal = ConstantFP::get(APFloat(1.0));
|
||||
}
|
||||
|
||||
Value *NextVar = Builder.CreateAdd(Variable, StepVal, "nextvar");
|
||||
@ -1545,7 +1545,7 @@ Value *ForExprAST::Codegen() {
|
||||
|
||||
// Convert condition to a bool by comparing equal to 0.0.
|
||||
EndCond = Builder.CreateFCmpONE(EndCond,
|
||||
ConstantFP::get(Type::DoubleTy, APFloat(0.0)),
|
||||
ConstantFP::get(APFloat(0.0)),
|
||||
"loopcond");
|
||||
|
||||
// Create the "after loop" block and insert it.
|
||||
|
@ -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 = ConstantFP::get(Type::DoubleTy, APFloat(0.0));
|
||||
InitVal = ConstantFP::get(APFloat(0.0));
|
||||
}
|
||||
|
||||
AllocaInst *Alloca = CreateEntryBlockAlloca(TheFunction, VarName);
|
||||
@ -1622,7 +1622,7 @@ static AllocaInst *CreateEntryBlockAlloca(Function *TheFunction,
|
||||
|
||||
|
||||
Value *NumberExprAST::Codegen() {
|
||||
return ConstantFP::get(Type::DoubleTy, APFloat(Val));
|
||||
return ConstantFP::get(APFloat(Val));
|
||||
}
|
||||
|
||||
Value *VariableExprAST::Codegen() {
|
||||
@ -1715,7 +1715,7 @@ Value *IfExprAST::Codegen() {
|
||||
|
||||
// Convert condition to a bool by comparing equal to 0.0.
|
||||
CondV = Builder.CreateFCmpONE(CondV,
|
||||
ConstantFP::get(Type::DoubleTy, APFloat(0.0)),
|
||||
ConstantFP::get(APFloat(0.0)),
|
||||
"ifcond");
|
||||
|
||||
Function *TheFunction = Builder.GetInsertBlock()->getParent();
|
||||
@ -1821,7 +1821,7 @@ Value *ForExprAST::Codegen() {
|
||||
if (StepVal == 0) return 0;
|
||||
} else {
|
||||
// If not specified, use 1.0.
|
||||
StepVal = ConstantFP::get(Type::DoubleTy, APFloat(1.0));
|
||||
StepVal = ConstantFP::get(APFloat(1.0));
|
||||
}
|
||||
|
||||
// Compute the end condition.
|
||||
@ -1836,7 +1836,7 @@ Value *ForExprAST::Codegen() {
|
||||
|
||||
// Convert condition to a bool by comparing equal to 0.0.
|
||||
EndCond = Builder.CreateFCmpONE(EndCond,
|
||||
ConstantFP::get(Type::DoubleTy, APFloat(0.0)),
|
||||
ConstantFP::get(APFloat(0.0)),
|
||||
"loopcond");
|
||||
|
||||
// Create the "after loop" block and insert it.
|
||||
@ -1880,7 +1880,7 @@ Value *VarExprAST::Codegen() {
|
||||
InitVal = Init->Codegen();
|
||||
if (InitVal == 0) return 0;
|
||||
} else { // If not specified, use 0.0.
|
||||
InitVal = ConstantFP::get(Type::DoubleTy, APFloat(0.0));
|
||||
InitVal = ConstantFP::get(APFloat(0.0));
|
||||
}
|
||||
|
||||
AllocaInst *Alloca = CreateEntryBlockAlloca(TheFunction, VarName);
|
||||
|
Loading…
x
Reference in New Issue
Block a user