diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-11 18:11:15 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-11 18:11:15 +0000 |
commit | 270968279b3e1e7d15c857b54d4defb685d02b88 (patch) | |
tree | 606ac20064a3207e3e8347ee6b79752a9cc8917a /llvm/lib/VMCore/Instructions.cpp | |
parent | 5c310be0ff7b5230b8672ad5b3a6c4eab01d0c8a (diff) | |
download | bcm5719-llvm-270968279b3e1e7d15c857b54d4defb685d02b88.tar.gz bcm5719-llvm-270968279b3e1e7d15c857b54d4defb685d02b88.zip |
Revert 78680 until I figure out why it completely broke things.
llvm-svn: 78697
Diffstat (limited to 'llvm/lib/VMCore/Instructions.cpp')
-rw-r--r-- | llvm/lib/VMCore/Instructions.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp index 0bf1e42f2df..e7983e07dc1 100644 --- a/llvm/lib/VMCore/Instructions.cpp +++ b/llvm/lib/VMCore/Instructions.cpp @@ -863,6 +863,46 @@ LoadInst::LoadInst(Value *Ptr, const Twine &Name, bool isVolatile, setName(Name); } + + +LoadInst::LoadInst(Value *Ptr, const char *Name, Instruction *InsertBef) + : UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(), + Load, Ptr, InsertBef) { + setVolatile(false); + setAlignment(0); + AssertOK(); + if (Name && Name[0]) setName(Name); +} + +LoadInst::LoadInst(Value *Ptr, const char *Name, BasicBlock *InsertAE) + : UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(), + Load, Ptr, InsertAE) { + setVolatile(false); + setAlignment(0); + AssertOK(); + if (Name && Name[0]) setName(Name); +} + +LoadInst::LoadInst(Value *Ptr, const char *Name, bool isVolatile, + Instruction *InsertBef) +: UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(), + Load, Ptr, InsertBef) { + setVolatile(isVolatile); + setAlignment(0); + AssertOK(); + if (Name && Name[0]) setName(Name); +} + +LoadInst::LoadInst(Value *Ptr, const char *Name, bool isVolatile, + BasicBlock *InsertAE) + : UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(), + Load, Ptr, InsertAE) { + setVolatile(isVolatile); + setAlignment(0); + AssertOK(); + if (Name && Name[0]) setName(Name); +} + void LoadInst::setAlignment(unsigned Align) { assert((Align & (Align-1)) == 0 && "Alignment is not a power of 2!"); SubclassData = (SubclassData & 1) | ((Log2_32(Align)+1)<<1); |