Skip to content

Commit 510a078

Browse files
committed
[Xtensa] fix duplicated CPI symbols with text section literals (LLVM-443) #113
1 parent 0b10ac7 commit 510a078

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
@@ -171,6 +171,10 @@ void XtensaAsmPrinter::emitMachineConstantPoolEntry(
171171
// used to print out constants which have been "spilled to memory" by
172172
// the code generator.
173173
void XtensaAsmPrinter::emitConstantPool() {
174+
auto *ST = &MF->getSubtarget<XtensaSubtarget>();
175+
if (ST->useTextSectionLiterals())
176+
return;
177+
174178
const Function &F = MF->getFunction();
175179
const MachineConstantPool *MCP = MF->getConstantPool();
176180
const std::vector<MachineConstantPoolEntry> &CP = MCP->getConstants();

0 commit comments

Comments
 (0)