[cfe-commits] [PATCH] use llvm::StringRef more
Jay Foad
jay.foad at gmail.com
Tue Jun 21 07:35:04 PDT 2011
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-stringref
Type: application/octet-stream
Size: 18468 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110621/75c2941c/attachment.obj>
More information about the cfe-commits
mailing list