The patch is correct, but it should probably have a test. Without the patch llvm-link crashes when linking two files that differ only in the pointers in the datalayout, so it should be easy to add a test. http://reviews.llvm.org/D3435