From ccb3e60b4556f5fbc7f21081b96334117a1fd64d Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sat, 23 Nov 2013 13:54:21 -0800 Subject: fix phi constants --- lib/Target/CppBackend/CPPBackend.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Target/CppBackend/CPPBackend.cpp') diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp index 1af893854f..06e5b5397f 100644 --- a/lib/Target/CppBackend/CPPBackend.cpp +++ b/lib/Target/CppBackend/CPPBackend.cpp @@ -502,7 +502,7 @@ std::string CppWriter::getPhiCode(const BasicBlock *From, const BasicBlock *To) assigns[name] = getAssign(name, P->getType()); Value *V = P->getIncomingValue(index); values[name] = V; - std::string vname = getCppName(V); + std::string vname = getValueAsStr(V); if (!dyn_cast(V)) { deps[name] = vname; undeps[vname] = name; @@ -516,7 +516,7 @@ std::string CppWriter::getPhiCode(const BasicBlock *From, const BasicBlock *To) StringMap::iterator last = I; std::string curr = last->first; Value *V = values[curr]; - std::string CV = getCppName(V); + std::string CV = getValueAsStr(V); I++; // advance now, as we may erase // if we have no dependencies, or we found none to emit and are at the end (so there is a cycle), emit StringMap::iterator dep = deps.find(curr); -- cgit v1.2.3-18-g5258