diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-11-22 16:00:21 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-11-22 16:00:21 -0800 |
commit | d9e561f23e72f7caaf0a5dec7ff2e23fe2da7302 (patch) | |
tree | e64a87d1bdfe2641c72c03eb0d7f69d74b74b7bd /lib/Target/CppBackend/CPPBackend.cpp | |
parent | 2f231412e31b8a79f3378d1b8331130634e78d0c (diff) |
set asm mode in relooper and add label var
Diffstat (limited to 'lib/Target/CppBackend/CPPBackend.cpp')
-rw-r--r-- | lib/Target/CppBackend/CPPBackend.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp index 5972a4383f..1e659d8d08 100644 --- a/lib/Target/CppBackend/CPPBackend.cpp +++ b/lib/Target/CppBackend/CPPBackend.cpp @@ -1761,6 +1761,7 @@ void CppWriter::printFunctionBody(const Function *F) { static char *buffer = new char[RELOOPER_BUFFER]; Relooper::SetOutputBuffer(buffer, RELOOPER_BUFFER); Relooper R; + R.SetAsmJSMode(1); Block *Entry = NULL; std::map<const BasicBlock*, Block*> LLVMToRelooper; @@ -1817,6 +1818,7 @@ void CppWriter::printFunctionBody(const Function *F) { // Emit local variables UsedVars["sp"] = Type::getInt32Ty(F->getContext())->getTypeID(); + UsedVars["label"] = Type::getInt32Ty(F->getContext())->getTypeID(); if (!UsedVars.empty()) { Out << " var "; for (VarMap::iterator VI = UsedVars.begin(); VI != UsedVars.end(); ++VI) { |