summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-07-15 02:51:31 +0000
committerChris Lattner <sabre@nondot.org>2004-07-15 02:51:31 +0000
commit60a7dd16c4ea9c6d9ad6671c87c640bc137b5904 (patch)
tree6f9d46d39ddd3fec988e9879d84f8375ac4d6797 /llvm/lib
parentf2b5817b1bf9d49af9b5c61857bdfcf485147cbf (diff)
downloadbcm5719-llvm-60a7dd16c4ea9c6d9ad6671c87c640bc137b5904.tar.gz
bcm5719-llvm-60a7dd16c4ea9c6d9ad6671c87c640bc137b5904.zip
Fixes for PR341
llvm-svn: 14847
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/ExecutionEngine/ExecutionEngine.cpp8
-rw-r--r--llvm/lib/ExecutionEngine/Interpreter/Execution.cpp4
-rw-r--r--llvm/lib/VMCore/AsmWriter.cpp22
3 files changed, 17 insertions, 17 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
index 465b19e42da..e53c468a2f3 100644
--- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -278,7 +278,7 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
}
break;
default:
- std::cout << "ERROR: Constant unimp for type: " << C->getType() << "\n";
+ std::cout << "ERROR: Constant unimp for type: " << *C->getType() << "\n";
abort();
}
return Result;
@@ -319,7 +319,7 @@ void ExecutionEngine::StoreValueToMemory(GenericValue Val, GenericValue *Ptr,
Ptr->Untyped[7] = (Val.ULongVal >> 56) & 255;
break;
default:
- std::cout << "Cannot store value of type " << Ty << "!\n";
+ std::cout << "Cannot store value of type " << *Ty << "!\n";
}
} else {
switch (Ty->getTypeID()) {
@@ -352,7 +352,7 @@ void ExecutionEngine::StoreValueToMemory(GenericValue Val, GenericValue *Ptr,
Ptr->Untyped[0] = (Val.ULongVal >> 56) & 255;
break;
default:
- std::cout << "Cannot store value of type " << Ty << "!\n";
+ std::cout << "Cannot store value of type " << *Ty << "!\n";
}
}
}
@@ -471,7 +471,7 @@ void ExecutionEngine::InitializeMemory(const Constant *Init, void *Addr) {
}
default:
- std::cerr << "Bad Type: " << Init->getType() << "\n";
+ std::cerr << "Bad Type: " << *Init->getType() << "\n";
assert(0 && "Unknown constant type to initialize memory with!");
}
}
diff --git a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
index a9846705b43..1095ecbeb02 100644
--- a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
@@ -146,7 +146,7 @@ GenericValue Interpreter::getConstantExprValue (ConstantExpr *CE,
getOperandValue(CE->getOperand(1), SF),
getOperandValue(CE->getOperand(2), SF));
default:
- std::cerr << "Unhandled ConstantExpr: " << CE << "\n";
+ std::cerr << "Unhandled ConstantExpr: " << *CE << "\n";
abort();
return GenericValue();
}
@@ -236,7 +236,7 @@ static GenericValue executeMulInst(GenericValue Src1, GenericValue Src2,
IMPLEMENT_BINARY_OPERATOR(*, Float);
IMPLEMENT_BINARY_OPERATOR(*, Double);
default:
- std::cout << "Unhandled type for Mul instruction: " << Ty << "\n";
+ std::cout << "Unhandled type for Mul instruction: " << *Ty << "\n";
abort();
}
return Dest;
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index bd6c09e0e51..0f76712a2b5 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/lib/VMCore/AsmWriter.cpp
@@ -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 @@ public:
};
-}
+} // end namespace llvm
static RegisterPass<PrintModulePass>
X("printm", "Print module to stderr",PassInfo::Analysis|PassInfo::Optimization);
@@ -1213,27 +1213,27 @@ CachedWriter::~CachedWriter() {
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;
}
OpenPOWER on IntegriCloud