mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-02 10:49:22 +00:00
The parent of a constant pool is a symtabvalue, not a value.
llvm-svn: 180
This commit is contained in:
parent
56f73d45f5
commit
32e96bcb54
@ -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