summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/CodeGen/CGObjCGNU.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp
index 9c83b75b2af..ae9d86137c8 100644
--- a/clang/lib/CodeGen/CGObjCGNU.cpp
+++ b/clang/lib/CodeGen/CGObjCGNU.cpp
@@ -799,7 +799,7 @@ llvm::Function *CGObjCGNU::ModuleInitFunction() {
return NULL;
const llvm::StructType *SelStructTy =
- cast<llvm::StructType>(SelectorTy->getTypeAtIndex(0U));
+ cast<llvm::StructType>(SelectorTy->getElementType());
// Name the ObjC types to make the IR a bit easier to read
TheModule.addTypeName(".objc_selector", SelectorTy);
OpenPOWER on IntegriCloud