diff options
-rw-r--r-- | lib/Target/CppBackend/CPPBackend.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp index c7b2feb30a..c413639939 100644 --- a/lib/Target/CppBackend/CPPBackend.cpp +++ b/lib/Target/CppBackend/CPPBackend.cpp @@ -253,7 +253,6 @@ namespace { std::string getValueAsCastStr(const Value*, AsmCast sign=ASM_SIGNED); std::string getValueAsParenStr(const Value*); std::string getValueAsCastParenStr(const Value*, AsmCast sign=ASM_SIGNED); - std::string getCppName(Type* val); std::string getCppName(const Value* val); @@ -1125,8 +1124,8 @@ void JSWriter::printFunctionBody(const Function *F) { BasicBlock *S1 = br->getSuccessor(1); std::string P0 = getPhiCode(&*BI, S0); std::string P1 = getPhiCode(&*BI, S1); - LLVMToRelooper[&*BI]->AddBranchTo(LLVMToRelooper[&*S0], getOpName(TI->getOperand(0)).c_str(), P0.size() > 0 ? P0.c_str() : NULL); - LLVMToRelooper[&*BI]->AddBranchTo(LLVMToRelooper[&*S1], NULL, P1.size() > 0 ? P1.c_str() : NULL); + LLVMToRelooper[&*BI]->AddBranchTo(LLVMToRelooper[&*S0], getValueAsStr(TI->getOperand(0)).c_str(), P0.size() > 0 ? P0.c_str() : NULL); + LLVMToRelooper[&*BI]->AddBranchTo(LLVMToRelooper[&*S1], NULL, P1.size() > 0 ? P1.c_str() : NULL); } else if (br->getNumOperands() == 1) { BasicBlock *S = br->getSuccessor(0); std::string P = getPhiCode(&*BI, S); |