projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2d22f6
)
Add support for printing globals
author
Chris Lattner
<sabre@nondot.org>
Mon, 10 Sep 2001 20:08:19 +0000
(20:08 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Mon, 10 Sep 2001 20:08:19 +0000
(20:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@537
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/AsmWriter.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/AsmWriter.cpp
b/lib/VMCore/AsmWriter.cpp
index 9056865849ac79168416e4654bed9f9b7c7c32ba..926e61160c99608100cb54742f37f333dbdab75f 100644
(file)
--- 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);