Index: lib/Support/StringSaver.cpp =================================================================== --- lib/Support/StringSaver.cpp +++ lib/Support/StringSaver.cpp @@ -12,6 +12,8 @@ using namespace llvm; StringRef StringSaver::save(StringRef S) { + if (S.empty()) + return StringRef(); char *P = Alloc.Allocate(S.size() + 1); memcpy(P, S.data(), S.size()); P[S.size()] = '\0';