update this to ConstantDataArray. There are no tests and this isn't using the preferred functionality for ripping apart strings, so I have no way to test this.

llvm-svn: 149361
This commit is contained in:
Chris Lattner 2012-01-31 06:03:46 +00:00
parent 2b3c187489
commit 841d7a2434
1 changed files with 2 additions and 2 deletions

View File

@ -190,9 +190,9 @@ bool LTOModule::objcClassNameFromExpression(Constant *c, std::string &name) {
Constant *op = ce->getOperand(0);
if (GlobalVariable *gvn = dyn_cast<GlobalVariable>(op)) {
Constant *cn = gvn->getInitializer();
if (ConstantArray *ca = dyn_cast<ConstantArray>(cn)) {
if (ConstantDataArray *ca = dyn_cast<ConstantDataArray>(cn)) {
if (ca->isCString()) {
name = ".objc_class_name_" + ca->getAsCString();
name = ".objc_class_name_" + ca->getAsCString().str();
return true;
}
}