summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CWriter/Writer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-08-22 22:48:55 +0000
committerChris Lattner <sabre@nondot.org>2002-08-22 22:48:55 +0000
commit030effa42ca55f9bc37e542b8e06e8abf4ea730c (patch)
tree0ad6b7464b94d1b821b8efa36f912f7e1f5dfb02 /llvm/lib/CWriter/Writer.cpp
parent62b42ce7640353d4f1d71a656bfd92ad37da1e05 (diff)
downloadbcm5719-llvm-030effa42ca55f9bc37e542b8e06e8abf4ea730c.tar.gz
bcm5719-llvm-030effa42ca55f9bc37e542b8e06e8abf4ea730c.zip
Load & StoreInst no longer derive from MemAccessInst, so we don't have
to handle indexing anymore llvm-svn: 3484
Diffstat (limited to 'llvm/lib/CWriter/Writer.cpp')
-rw-r--r--llvm/lib/CWriter/Writer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CWriter/Writer.cpp b/llvm/lib/CWriter/Writer.cpp
index 910fde6a8bb..eece0c9cedc 100644
--- a/llvm/lib/CWriter/Writer.cpp
+++ b/llvm/lib/CWriter/Writer.cpp
@@ -847,10 +847,8 @@ void CWriter::printIndexingExpression(Value *Ptr, User::op_iterator I,
} else { // Performing array indexing. Just skip the 0
++I;
}
- } else if (HasImplicitAddress) {
-
}
-
+
for (; I != E; ++I)
if ((*I)->getType() == Type::UIntTy) {
Out << "[";
@@ -862,11 +860,13 @@ void CWriter::printIndexingExpression(Value *Ptr, User::op_iterator I,
}
void CWriter::visitLoadInst(LoadInst &I) {
- printIndexingExpression(I.getPointerOperand(), I.idx_begin(), I.idx_end());
+ Out << "*";
+ writeOperand(I.getOperand(0));
}
void CWriter::visitStoreInst(StoreInst &I) {
- printIndexingExpression(I.getPointerOperand(), I.idx_begin(), I.idx_end());
+ Out << "*";
+ writeOperand(I.getPointerOperand());
Out << " = ";
writeOperand(I.getOperand(0));
}
OpenPOWER on IntegriCloud