mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
The parent of a constant pool is a symtabvalue, not a value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e98dda6d42
commit
54d56e3a99
@ -320,11 +320,11 @@ void WriteToAssembly(const ConstPoolVal *CPV, ostream &o) {
|
||||
// A Constant pool value may have a parent that is either a method or a
|
||||
// module. Untangle this now...
|
||||
//
|
||||
if (CPV->getParent() == 0 || CPV->getParent()->isMethod()) {
|
||||
SlotTable = new SlotCalculator((Method*)CPV->getParent(), true);
|
||||
if (const Method *Meth = CPV->getParentV()->castMethod()) {
|
||||
SlotTable = new SlotCalculator(Meth, true);
|
||||
} else {
|
||||
SlotTable =
|
||||
new SlotCalculator(CPV->getParent()->castModuleAsserting(), true);
|
||||
new SlotCalculator(CPV->getParentV()->castModuleAsserting(), true);
|
||||
}
|
||||
|
||||
AssemblyWriter W(o, *SlotTable);
|
||||
|
Loading…
Reference in New Issue
Block a user