diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-11-23 13:54:21 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-11-23 13:54:21 -0800 |
commit | ccb3e60b4556f5fbc7f21081b96334117a1fd64d (patch) | |
tree | 897acb6b04c8e3a2e8856169d5a0d55a228894fd /lib/Target/CppBackend/CPPBackend.cpp | |
parent | c296168cdd96824569a66d8c4ec115089453f37a (diff) |
fix phi constants
Diffstat (limited to 'lib/Target/CppBackend/CPPBackend.cpp')
-rw-r--r-- | lib/Target/CppBackend/CPPBackend.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<Constant>(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); |