Fix a serious null termination bug found by David Chisnall!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60778 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 80ef53f..c8fa994 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -959,7 +959,7 @@
/// character. The result has pointer to array type.
llvm::Constant *CodeGenModule::GetAddrOfConstantCString(const std::string &str,
const char *GlobalName){
- return GetAddrOfConstantString(str + "\0", GlobalName);
+ return GetAddrOfConstantString(str + '\0', GlobalName);
}
/// EmitObjCPropertyImplementations - Emit information for synthesized