aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/VMCore/AsmWriter.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index 9056865849..926e61160c 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -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);