Patch contributed by Jay Foad! llvm-svn: 59656
must be under the `tools' subdirectory of the LLVM *source* tree. llvm-svn: 58180