mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-02 00:37:09 +00:00
Add support for printing globals
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@537 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b2d22f6dce
commit
b0e4523624
@ -371,6 +371,13 @@ void WriteToAssembly(const Module *M, ostream &o) {
|
||||
W.write(M);
|
||||
}
|
||||
|
||||
void WriteToAssembly(const GlobalVariable *G, ostream &o) {
|
||||
if (G == 0) { o << "<null> global variable\n"; return; }
|
||||
SlotCalculator SlotTable(G->getParent(), true);
|
||||
AssemblyWriter W(o, SlotTable);
|
||||
W.write(G);
|
||||
}
|
||||
|
||||
void WriteToAssembly(const Method *M, ostream &o) {
|
||||
if (M == 0) { o << "<null> method\n"; return; }
|
||||
SlotCalculator SlotTable(M->getParent(), true);
|
||||
|
Loading…
Reference in New Issue
Block a user