commit | ac8bc12cd15fd677565a79b7877890aceb74069a | [log] [tgz] |
---|---|---|
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | Fri May 20 19:24:12 2011 +0000 |
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | Fri May 20 19:24:12 2011 +0000 |
tree | 546c4117f825dc9116b4d974671eee6d86740dd2 | |
parent | 91f1d247363ee1fbc567a0dbea94bc6bfd76db02 [diff] |
Add asserts in StringRef to make sure we avoid undefined behavior: -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