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:
Chris Lattner 2001-07-14 06:10:33 +00:00
parent e98dda6d42
commit 54d56e3a99

View File

@ -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);