aboutsummaryrefslogtreecommitdiff
path: root/tools/lto
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-06-28 08:24:19 +0000
committerJay Foad <jay.foad@gmail.com>2011-06-28 08:24:19 +0000
commit4f91054fe4a593f23b46abe359d2df9aebc50f10 (patch)
treefd9004ff73f3cca95b24004144ac96b7b65b286a /tools/lto
parent4086bb5ba58ed83dba4991599c00bfba34693d3a (diff)
PR10210: New method ConstantArray::getAsCString(). Use it in LTO to
avoid getting embedded trailing null bytes in std::strings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133999 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto')
-rw-r--r--tools/lto/LTOModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp
index 8f2b1f4840..fe8e6cfa0d 100644
--- a/tools/lto/LTOModule.cpp
+++ b/tools/lto/LTOModule.cpp
@@ -191,7 +191,7 @@ bool LTOModule::objcClassNameFromExpression(Constant *c, std::string &name) {
Constant *cn = gvn->getInitializer();
if (ConstantArray *ca = dyn_cast<ConstantArray>(cn)) {
if (ca->isCString()) {
- name = ".objc_class_name_" + ca->getAsString();
+ name = ".objc_class_name_" + ca->getAsCString();
return true;
}
}