-strlen should not be called with NULL. Also guarantee that StringRef's Length is 0 if Data is NULL. -memcmp should not be called with NULL (even if size is 0) Patch by Matthieu Monrocq! llvm-svn: 131747