Make more use of llvm::StringRef in various APIs. In particular, the
original motivation for this was to avoid using the deprecated forms
of llvm::StringMap::GetOrCreateValue():

  // FIXME: Remove this method.
  template <typename InitTy>
  MapEntryTy &GetOrCreateValue(const char *KeyStart, const char *KeyEnd,
                               InitTy Val) {
    return GetOrCreateValue(StringRef(KeyStart, KeyEnd - KeyStart), Val);
  }

  // FIXME: Remove this method.
  MapEntryTy &GetOrCreateValue(const char *KeyStart, const char *KeyEnd) {
    return GetOrCreateValue(StringRef(KeyStart, KeyEnd - KeyStart));
  }

Tested with "make check-all", LLVM and Clang. OK to commit?

Thanks,
Jay.

Attachment: clang-stringref
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to