summaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-11 18:11:15 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-11 18:11:15 +0000
commit3603d7a3528e6f3402ea4f7057a0b7cc5cc6488b (patch)
tree12cb35029bb25485b72a77357861dcc2b190bf02 /lib/VMCore
parentab67e705f59d567afded845465f358b8a66ab62e (diff)
downloadexternal_llvm-3603d7a3528e6f3402ea4f7057a0b7cc5cc6488b.zip
external_llvm-3603d7a3528e6f3402ea4f7057a0b7cc5cc6488b.tar.gz
external_llvm-3603d7a3528e6f3402ea4f7057a0b7cc5cc6488b.tar.bz2
Revert 78680 until I figure out why it completely broke things.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/Instructions.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index 0bf1e42..e7983e0 100644
--- a/lib/VMCore/Instructions.cpp
+++ b/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);