Switch UnaryOperators to default to passing names up by const char* when possible.
[oota-llvm.git] / include / llvm / Instructions.h
index 659659c65e703b6366bb167634537bdb3889e1b7..3d22ef202ae7661f7ea511f5853e1c9ca716722c 100644 (file)
@@ -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;