Reappy r80998, now that the GlobalOpt bug that it exposed on MiniSAT is fixed.
[oota-llvm.git] / include / llvm / GlobalValue.h
index b897f9f6bba0cb2187c78bd1e41289d8d3f437cd..7b0de34d9cb6fd5c2dd218efc34d61665219238c 100644 (file)
@@ -56,10 +56,10 @@ public:
 
 protected:
   GlobalValue(const Type *ty, ValueTy vty, Use *Ops, unsigned NumOps,
-              LinkageTypes linkage, const std::string &name = "")
+              LinkageTypes linkage, const Twine &Name = "")
     : Constant(ty, vty, Ops, NumOps), Parent(0),
       Linkage(linkage), Visibility(DefaultVisibility), Alignment(0) {
-    if (!name.empty()) setName(name);
+    setName(Name);
   }
 
   Module *Parent;
@@ -90,7 +90,7 @@ public:
   
   bool hasSection() const { return !Section.empty(); }
   const std::string &getSection() const { return Section; }
-  void setSection(const std::string &S) { Section = S; }
+  void setSection(const StringRef &S) { Section = S; }
   
   /// If the usage is empty (except transitively dead constants), then this
   /// global value can can be safely deleted since the destructor will