Commit 24824e75 by Jim Stichnoth

Subzero: Honor the Internal flag when filetype=asm.

When filetype=asm, the Internal flag of the Cfg wasn't being copied to the Assembler, so all symbols were made global. This would cause multiply defined symbols in Spec, particularly main(). BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/921043002
parent 307e326f
......@@ -198,6 +198,7 @@ void GlobalContext::translateFunctions() {
getStrDump() << "ICE translation error: " << Func->getError() << "\n";
Item = new EmitterWorkItem(Func->getSequenceNumber());
} else {
Func->getAssembler<>()->setInternal(Func->getInternal());
switch (getFlags().getOutFileType()) {
case FT_Elf:
case FT_Iasm: {
......@@ -209,7 +210,6 @@ void GlobalContext::translateFunctions() {
Assembler *Asm = Func->releaseAssembler();
// Copy relevant fields into Asm before Func is deleted.
Asm->setFunctionName(Func->getFunctionName());
Asm->setInternal(Func->getInternal());
Item = new EmitterWorkItem(Func->getSequenceNumber(), Asm);
} break;
case FT_Asm:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment