aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/llvm/InstrTypes.h14
-rw-r--r--include/llvm/Instruction.h7
-rw-r--r--include/llvm/Instructions.h17
3 files changed, 26 insertions, 12 deletions
diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h
index 348671a..0fff238 100644
--- a/include/llvm/InstrTypes.h
+++ b/include/llvm/InstrTypes.h
@@ -91,11 +91,11 @@ class UnaryInstruction : public Instruction {
Use Op;
protected:
UnaryInstruction(const Type *Ty, unsigned iType, Value *V,
- const std::string &Name = "", Instruction *IB = 0)
+ const char *Name = 0, Instruction *IB = 0)
: Instruction(Ty, iType, &Op, 1, Name, IB), Op(V, this) {
}
UnaryInstruction(const Type *Ty, unsigned iType, Value *V,
- const std::string &Name, BasicBlock *IAE)
+ const char *Name = 0, BasicBlock *IAE)
: Instruction(Ty, iType, &Op, 1, Name, IAE), Op(V, this) {
}
public:
@@ -263,13 +263,15 @@ class CastInst : public UnaryInstruction {
protected:
/// @brief Constructor with insert-before-instruction semantics for subclasses
CastInst(const Type *Ty, unsigned iType, Value *S,
- const std::string &Name = "", Instruction *InsertBefore = 0)
- : UnaryInstruction(Ty, iType, S, Name, InsertBefore) {
+ const std::string &Name = "", Instruction *InsertBefore = 0)
+ : UnaryInstruction(Ty, iType, S, 0, InsertBefore) {
+ setName(Name);
}
/// @brief Constructor with insert-at-end-of-block semantics for subclasses
CastInst(const Type *Ty, unsigned iType, Value *S,
- const std::string &Name, BasicBlock *InsertAtEnd)
- : UnaryInstruction(Ty, iType, S, Name, InsertAtEnd) {
+ const std::string &Name, BasicBlock *InsertAtEnd)
+ : UnaryInstruction(Ty, iType, S, 0, InsertAtEnd) {
+ setName(Name);
}
public:
/// Provides a way to construct any of the CastInst subclasses using an
diff --git a/include/llvm/Instruction.h b/include/llvm/Instruction.h
index 15c5919..7f7bcc8 100644
--- a/include/llvm/Instruction.h
+++ b/include/llvm/Instruction.h
@@ -41,10 +41,13 @@ class Instruction : public User {
void setParent(BasicBlock *P);
protected:
Instruction(const Type *Ty, unsigned iType, Use *Ops, unsigned NumOps,
- const std::string &Name = "",
- Instruction *InsertBefore = 0);
+ const std::string &Name, Instruction *InsertBefore = 0);
Instruction(const Type *Ty, unsigned iType, Use *Ops, unsigned NumOps,
const std::string &Name, BasicBlock *InsertAtEnd);
+ Instruction(const Type *Ty, unsigned iType, Use *Ops, unsigned NumOps,
+ const char *Name = 0, Instruction *InsertBefore = 0);
+ Instruction(const Type *Ty, unsigned iType, Use *Ops, unsigned NumOps,
+ const char *Name, BasicBlock *InsertAtEnd);
public:
// Out of line virtual method, so the vtable, etc has a home.
~Instruction();
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index 659659c..3d22ef2 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -222,11 +222,18 @@ class LoadInst : public UnaryInstruction {
public:
LoadInst(Value *Ptr, const std::string &Name, Instruction *InsertBefore);
LoadInst(Value *Ptr, const std::string &Name, BasicBlock *InsertAtEnd);
- explicit LoadInst(Value *Ptr, const std::string &Name = "",
- bool isVolatile = false, Instruction *InsertBefore = 0);
+ LoadInst(Value *Ptr, const std::string &Name, bool isVolatile = false,
+ Instruction *InsertBefore = 0);
LoadInst(Value *Ptr, const std::string &Name, bool isVolatile,
BasicBlock *InsertAtEnd);
+ LoadInst(Value *Ptr, const char *Name, Instruction *InsertBefore);
+ LoadInst(Value *Ptr, const char *Name, BasicBlock *InsertAtEnd);
+ explicit LoadInst(Value *Ptr, const char *Name = 0, bool isVolatile = false,
+ Instruction *InsertBefore = 0);
+ LoadInst(Value *Ptr, const char *Name, bool isVolatile,
+ BasicBlock *InsertAtEnd);
+
/// isVolatile - Return true if this is a load from a volatile memory
/// location.
///
@@ -828,11 +835,13 @@ class VAArgInst : public UnaryInstruction {
public:
VAArgInst(Value *List, const Type *Ty, const std::string &Name = "",
Instruction *InsertBefore = 0)
- : UnaryInstruction(Ty, VAArg, List, Name, InsertBefore) {
+ : UnaryInstruction(Ty, VAArg, List, 0, InsertBefore) {
+ setName(Name);
}
VAArgInst(Value *List, const Type *Ty, const std::string &Name,
BasicBlock *InsertAtEnd)
- : UnaryInstruction(Ty, VAArg, List, Name, InsertAtEnd) {
+ : UnaryInstruction(Ty, VAArg, List, 0, InsertAtEnd) {
+ setName(Name);
}
virtual VAArgInst *clone() const;