Now that hopefully all direct accesses to InvokeInst operands are fixed
[oota-llvm.git] / include / llvm / Metadata.h
index cecb7dadaf1ffcfa3d1ad345fc96983c4e7a4075..ff3e03e96fd86bdb9946ae509eefe09b9cc1558b 100644 (file)
@@ -43,8 +43,10 @@ protected:
 
 public:
   static MDString *get(LLVMContext &Context, StringRef Str);
-  static MDString *get(LLVMContext &Context, const char *Str);
-  
+  static MDString *get(LLVMContext &Context, const char *Str) {
+    return get(Context, Str ? StringRef(Str) : StringRef());
+  }
+
   StringRef getString() const { return Str; }
 
   unsigned getLength() const { return (unsigned)Str.size(); }