[Coverage] Fix function mapping record emission

We emit an extra byte in the name field of function mapping records. The
extra null byte confuses llvm InstrProfReader, resulting in a loss of
coverage information.

We need execution tests to prevent this sort of issue from arising in
the future. Before that can happen, swift needs to start maintaining its
own branches of compiler-rt (this is SR-601).

Swift PR 1051, rdar://problem/24267336
diff --git a/lib/IRGen/GenCoverage.cpp b/lib/IRGen/GenCoverage.cpp
index eb7b57b..acfb5ca 100644
--- a/lib/IRGen/GenCoverage.cpp
+++ b/lib/IRGen/GenCoverage.cpp
@@ -82,7 +82,7 @@
     W.write(OS);
 
     auto *NameVal =
-        llvm::ConstantDataArray::getString(LLVMContext, M.getName(), true);
+        llvm::ConstantDataArray::getString(LLVMContext, M.getName(), false);
     auto *NameVar =
         new llvm::GlobalVariable(*getModule(), NameVal->getType(), true,
                                  llvm::GlobalValue::LinkOnceAnyLinkage, NameVal,
@@ -94,7 +94,7 @@
         llvm::ConstantExpr::getBitCast(NameVar, Int8PtrTy),
         // TODO: We're including the null to match the profile, but we should
         // really skip the null in the profile instead.
-        llvm::ConstantInt::get(Int32Ty, M.getName().size() + 1),
+        llvm::ConstantInt::get(Int32Ty, M.getName().size()),
         llvm::ConstantInt::get(Int32Ty, CurrentSize - PrevSize),
         llvm::ConstantInt::get(Int64Ty, M.getHash())};
     FunctionRecords.push_back(llvm::ConstantStruct::get(