Allow alias to point to an arbitrary ConstantExpr.
[oota-llvm.git] / include / llvm / IR / GlobalObject.h
index 3bc8b8531dd6730d3f0c0c236302fec4f2109b0b..74cc18eeb1e7696bb6f4e770d95df7054a20493b 100644 (file)
@@ -40,8 +40,8 @@ public:
   }
   void setAlignment(unsigned Align);
 
-  bool hasSection() const { return !getSection().empty(); }
-  const std::string &getSection() const { return Section; }
+  bool hasSection() const { return !StringRef(getSection()).empty(); }
+  const char *getSection() const { return Section.c_str(); }
   void setSection(StringRef S);
 
   void copyAttributesFrom(const GlobalValue *Src) override;