mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
Fix for PR 26378
This patch corresponds to review: http://reviews.llvm.org/D17712 We were not clearing the TOC vector in PPCAsmPrinter when initializing it. This caused duplicate definition asserts when the pass is reused on the module (i.e. with -compile-twice or in JIT contexts). llvm-svn: 263338
This commit is contained in:
parent
7c4cb4a01e
commit
eaa9a4f81a
@ -82,6 +82,12 @@ public:
|
||||
|
||||
MCSymbol *lookUpOrCreateTOCEntry(MCSymbol *Sym);
|
||||
|
||||
virtual bool doInitialization(Module &M) override {
|
||||
if (!TOC.empty())
|
||||
TOC.clear();
|
||||
return AsmPrinter::doInitialization(M);
|
||||
}
|
||||
|
||||
void EmitInstruction(const MachineInstr *MI) override;
|
||||
|
||||
void printOperand(const MachineInstr *MI, unsigned OpNo, raw_ostream &O);
|
||||
|
6
test/CodeGen/PowerPC/pr26378.ll
Normal file
6
test/CodeGen/PowerPC/pr26378.ll
Normal file
@ -0,0 +1,6 @@
|
||||
; RUN: llc -compile-twice -filetype obj \
|
||||
; RUN: -mtriple=powerpc64le-unknown-unknown -mcpu=pwr8 < %s
|
||||
@foo = common global i32 0, align 4
|
||||
define i8* @blah() #0 {
|
||||
ret i8* bitcast (i32* @foo to i8*)
|
||||
}
|
Loading…
Reference in New Issue
Block a user