Skip to content

Commit c2a5eff

Browse files
andreisfrgerekon
authored andcommitted
[PATCH] [Xtensa] Fix duplicated CPI symbols with text section literals (LLVM-443)
Close #113
1 parent 0aa60c7 commit c2a5eff

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/lib/Target/Xtensa/XtensaAsmPrinter.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ void XtensaAsmPrinter::emitMachineConstantPoolEntry(
174174
// used to print out constants which have been "spilled to memory" by
175175
// the code generator.
176176
void XtensaAsmPrinter::emitConstantPool() {
177+
auto *ST = &MF->getSubtarget<XtensaSubtarget>();
178+
if (ST->useTextSectionLiterals())
179+
return;
180+
177181
const Function &F = MF->getFunction();
178182
const MachineConstantPool *MCP = MF->getConstantPool();
179183
const std::vector<MachineConstantPoolEntry> &CP = MCP->getConstants();

0 commit comments

Comments
 (0)