summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/PseudoSourceValue.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2009-10-14 17:57:32 +0000
committerrdivacky <rdivacky@FreeBSD.org>2009-10-14 17:57:32 +0000
commitcd749a9c07f1de2fb8affde90537efa4bc3e7c54 (patch)
treeb21f6de4e08b89bb7931806bab798fc2a5e3a686 /lib/CodeGen/PseudoSourceValue.cpp
parent72621d11de5b873f1695f391eb95f0b336c3d2d4 (diff)
downloadFreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.zip
FreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.tar.gz
Update llvm to r84119.
Diffstat (limited to 'lib/CodeGen/PseudoSourceValue.cpp')
-rw-r--r--lib/CodeGen/PseudoSourceValue.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/CodeGen/PseudoSourceValue.cpp b/lib/CodeGen/PseudoSourceValue.cpp
index b4c20e6..00c5d46 100644
--- a/lib/CodeGen/PseudoSourceValue.cpp
+++ b/lib/CodeGen/PseudoSourceValue.cpp
@@ -15,6 +15,7 @@
#include "llvm/CodeGen/PseudoSourceValue.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Support/Compiler.h"
+#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/raw_ostream.h"
#include <map>
@@ -38,15 +39,16 @@ static const char *const PSVNames[] = {
"ConstantPool"
};
+// FIXME: THIS IS A HACK!!!!
+// Eventually these should be uniqued on LLVMContext rather than in a managed
+// static. For now, we can safely use the global context for the time being to
+// squeak by.
PseudoSourceValue::PseudoSourceValue() :
- Value(PointerType::getUnqual(Type::Int8Ty), PseudoSourceValueVal) {}
+ Value(Type::getInt8PtrTy(getGlobalContext()),
+ PseudoSourceValueVal) {}
-void PseudoSourceValue::dump() const {
- print(errs()); errs() << '\n';
-}
-
-void PseudoSourceValue::print(raw_ostream &OS) const {
- OS << PSVNames[this - *PSVs];
+void PseudoSourceValue::printCustom(raw_ostream &O) const {
+ O << PSVNames[this - *PSVs];
}
namespace {
@@ -61,7 +63,7 @@ namespace {
virtual bool isConstant(const MachineFrameInfo *MFI) const;
- virtual void print(raw_ostream &OS) const {
+ virtual void printCustom(raw_ostream &OS) const {
OS << "FixedStack" << FI;
}
};
@@ -83,7 +85,7 @@ bool PseudoSourceValue::isConstant(const MachineFrameInfo *) const {
this == getConstantPool() ||
this == getJumpTable())
return true;
- assert(0 && "Unknown PseudoSourceValue!");
+ llvm_unreachable("Unknown PseudoSourceValue!");
return false;
}
OpenPOWER on IntegriCloud