diff options
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 51fa3302a23..08dc9930ba3 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1251,6 +1251,9 @@ GetConstantCFStringEntry(llvm::StringMap<llvm::Constant*> &Map, AsBytes.push_back(Val & 0xFF); } } + // Append one extra null character, the second is automatically added by our + // caller. + AsBytes.push_back(0); IsUTF16 = true; return Map.GetOrCreateValue(llvm::StringRef(AsBytes.data(), AsBytes.size())); |