[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Jul 14 19:51:41 PDT 2004
Changes in directory llvm/lib/VMCore:
AsmWriter.cpp updated: 1.146 -> 1.147
---
Log message:
Fixes for PR341: http://llvm.cs.uiuc.edu/PR341
---
Diffs of the changes: (+11 -11)
Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.146 llvm/lib/VMCore/AsmWriter.cpp:1.147
--- llvm/lib/VMCore/AsmWriter.cpp:1.146 Tue Jul 13 18:14:34 2004
+++ llvm/lib/VMCore/AsmWriter.cpp Wed Jul 14 21:51:31 2004
@@ -34,7 +34,7 @@
#include <algorithm>
using namespace llvm;
-namespace {
+namespace llvm {
/// This class provides computation of slot numbers for LLVM Assembly writing.
/// @brief LLVM Assembly Writing Slot Computation.
@@ -154,7 +154,7 @@
};
-}
+} // end namespace llvm
static RegisterPass<PrintModulePass>
X("printm", "Print module to stderr",PassInfo::Analysis|PassInfo::Optimization);
@@ -1213,27 +1213,27 @@
delete SC;
}
-CachedWriter &CachedWriter::operator<<(const Value *V) {
+CachedWriter &CachedWriter::operator<<(const Value &V) {
assert(AW && SC && "CachedWriter does not have a current module!");
- if (const Instruction *I = dyn_cast<Instruction>(V))
+ if (const Instruction *I = dyn_cast<Instruction>(&V))
AW->write(I);
- else if (const BasicBlock *BB = dyn_cast<BasicBlock>(V))
+ else if (const BasicBlock *BB = dyn_cast<BasicBlock>(&V))
AW->write(BB);
- else if (const Function *F = dyn_cast<Function>(V))
+ else if (const Function *F = dyn_cast<Function>(&V))
AW->write(F);
- else if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(V))
+ else if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(&V))
AW->write(GV);
else
- AW->writeOperand(V, true, true);
+ AW->writeOperand(&V, true, true);
return *this;
}
-CachedWriter& CachedWriter::operator<<(const Type *Ty) {
+CachedWriter& CachedWriter::operator<<(const Type &Ty) {
if (SymbolicTypes) {
const Module *M = AW->getModule();
- if (M) WriteTypeSymbolic(Out, Ty, M);
+ if (M) WriteTypeSymbolic(Out, &Ty, M);
} else {
- AW->write(Ty);
+ AW->write(&Ty);
}
return *this;
}
More information about the llvm-commits
mailing list