X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FVMCore%2FGlobals.cpp;h=d18a20162dd9e223899f1a1d4789fe9b2863acd1;hb=98c65173bb27e1df4ebe87f8c864d6dc197209ca;hp=adc7a82e6df10cc118bc48760d5fe5bae65830ba;hpb=c341f1c62d1b46b64fb70890fffed87a3136cc2d;p=oota-llvm.git diff --git a/lib/VMCore/Globals.cpp b/lib/VMCore/Globals.cpp index adc7a82e6df..d18a20162dd 100644 --- a/lib/VMCore/Globals.cpp +++ b/lib/VMCore/Globals.cpp @@ -21,7 +21,6 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/LeakDetector.h" -#include "llvm/Support/Streams.h" using namespace llvm; //===----------------------------------------------------------------------===// @@ -79,7 +78,7 @@ void GlobalValue::removeDeadConstantUsers() const { /// Override destroyConstant to make sure it doesn't get called on /// GlobalValue's because they shouldn't be treated like other constants. void GlobalValue::destroyConstant() { - LLVM_UNREACHABLE("You can't GV->destroyConstant()!"); + llvm_unreachable("You can't GV->destroyConstant()!"); } /// copyAttributesFrom - copy all additional attributes (those not needed to @@ -97,9 +96,9 @@ void GlobalValue::copyAttributesFrom(const GlobalValue *Src) { GlobalVariable::GlobalVariable(LLVMContext &Context, const Type *Ty, bool constant, LinkageTypes Link, - Constant *InitVal, const std::string &Name, + Constant *InitVal, const Twine &Name, bool ThreadLocal, unsigned AddressSpace) - : GlobalValue(Context.getPointerType(Ty, AddressSpace), + : GlobalValue(PointerType::get(Ty, AddressSpace), Value::GlobalVariableVal, OperandTraits::op_begin(this), InitVal != 0, Link, Name), @@ -115,10 +114,10 @@ GlobalVariable::GlobalVariable(LLVMContext &Context, const Type *Ty, GlobalVariable::GlobalVariable(Module &M, const Type *Ty, bool constant, LinkageTypes Link, Constant *InitVal, - const std::string &Name, + const Twine &Name, GlobalVariable *Before, bool ThreadLocal, unsigned AddressSpace) - : GlobalValue(M.getContext().getPointerType(Ty, AddressSpace), + : GlobalValue(PointerType::get(Ty, AddressSpace), Value::GlobalVariableVal, OperandTraits::op_begin(this), InitVal != 0, Link, Name), @@ -188,7 +187,7 @@ void GlobalVariable::copyAttributesFrom(const GlobalValue *Src) { //===----------------------------------------------------------------------===// GlobalAlias::GlobalAlias(const Type *Ty, LinkageTypes Link, - const std::string &Name, Constant* aliasee, + const Twine &Name, Constant* aliasee, Module *ParentModule) : GlobalValue(Ty, Value::GlobalAliasVal, &Op<0>(), 1, Link, Name) { LeakDetector::addGarbageObject(this); @@ -246,7 +245,7 @@ const GlobalValue *GlobalAlias::getAliasedGlobal() const { CE->getOpcode() == Instruction::GetElementPtr)) return dyn_cast(CE->getOperand(0)); else - LLVM_UNREACHABLE("Unsupported aliasee"); + llvm_unreachable("Unsupported aliasee"); } } return 0;