]> granicus.if.org Git - clang/commitdiff
switch from getTypeAtIndex to getElementType. It is non-virtual
authorChris Lattner <sabre@nondot.org>
Wed, 21 Jan 2009 19:21:36 +0000 (19:21 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 21 Jan 2009 19:21:36 +0000 (19:21 +0000)
and more idiomatic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62705 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjCGNU.cpp

index 9c83b75b2af89208995e3ccaf6187832f9e7dad5..ae9d86137c827ccade93c06a86a73447284c436f 100644 (file)
@@ -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);