diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2009-08-21 12:50:54 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2009-08-21 12:50:54 +0000 |
commit | eaaca496c5f8a958ceafba158fb5f092c1f36332 (patch) | |
tree | a7651539ee68446bda38825ce3f0af9809e81506 | |
parent | 232b19c3d5d755f08524a0f000eb35f2b63c5b97 (diff) | |
download | bcm5719-llvm-eaaca496c5f8a958ceafba158fb5f092c1f36332.tar.gz bcm5719-llvm-eaaca496c5f8a958ceafba158fb5f092c1f36332.zip |
More cpp backend fixes. Now for FP stuff.
llvm-svn: 79626
-rw-r--r-- | llvm/lib/Target/CppBackend/CPPBackend.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/CppBackend/CPPBackend.cpp b/llvm/lib/Target/CppBackend/CPPBackend.cpp index 3d7eefa2d07..3e393030e81 100644 --- a/llvm/lib/Target/CppBackend/CPPBackend.cpp +++ b/llvm/lib/Target/CppBackend/CPPBackend.cpp @@ -223,7 +223,7 @@ namespace { APFloat APF = APFloat(CFP->getValueAPF()); // copy if (CFP->getType() == Type::getFloatTy(CFP->getContext())) APF.convert(APFloat::IEEEdouble, APFloat::rmNearestTiesToEven, &ignored); - Out << "ConstantFP::get("; + Out << "ConstantFP::get(getGlobalContext(), "; Out << "APFloat("; #if HAVE_PRINTF_A char Buffer[100]; @@ -1214,7 +1214,7 @@ namespace { break; } case Instruction::FCmp: { - Out << "FCmpInst* " << iName << " = new FCmpInst("; + Out << "FCmpInst* " << iName << " = new FCmpInst(*" << bbname << ", "; switch (cast<FCmpInst>(I)->getPredicate()) { case FCmpInst::FCMP_FALSE: Out << "FCmpInst::FCMP_FALSE"; break; case FCmpInst::FCMP_OEQ : Out << "FCmpInst::FCMP_OEQ"; break; @@ -1236,7 +1236,7 @@ namespace { } Out << ", " << opNames[0] << ", " << opNames[1] << ", \""; printEscapedString(I->getName()); - Out << "\", " << bbname << ");"; + Out << "\");"; break; } case Instruction::ICmp: { |