mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Add support for printing constpointerrefs more nicely
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3654 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -872,6 +872,13 @@ void Instruction::print(std::ostream &o) const {
|
|||||||
|
|
||||||
void Constant::print(std::ostream &o) const {
|
void Constant::print(std::ostream &o) const {
|
||||||
if (this == 0) { o << "<null> constant value\n"; return; }
|
if (this == 0) { o << "<null> constant value\n"; return; }
|
||||||
|
|
||||||
|
// Handle CPR's special, because they have context information...
|
||||||
|
if (const ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(this)) {
|
||||||
|
CPR->getValue()->print(o); // Print as a global value, with context info.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
o << " " << getType()->getDescription() << " ";
|
o << " " << getType()->getDescription() << " ";
|
||||||
|
|
||||||
map<const Type *, string> TypeTable;
|
map<const Type *, string> TypeTable;
|
||||||
|
Reference in New Issue
Block a user