diff options
author | Chris Lattner <sabre@nondot.org> | 2001-07-14 06:10:33 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-07-14 06:10:33 +0000 |
commit | 54d56e3a995352784e290f97f11d1cf277080410 (patch) | |
tree | b063add7ea0c493ca2b81ad40c757b43297cff84 /lib/VMCore | |
parent | e98dda6d4224beaa5a9049f3287a933dc40ee980 (diff) | |
download | llvm-54d56e3a995352784e290f97f11d1cf277080410.tar.gz llvm-54d56e3a995352784e290f97f11d1cf277080410.tar.bz2 llvm-54d56e3a995352784e290f97f11d1cf277080410.tar.xz |
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
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 5a4e6f5557..78ef8c7553 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -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); |