瀏覽代碼

Add a TBAA type for pointer types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116544 91177308-0d34-0410-b5e6-96231b3b80d8
Dan Gohman 15 年之前
父節點
當前提交
c1028f45ea
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      lib/CodeGen/CodeGenTBAA.cpp

+ 4 - 0
lib/CodeGen/CodeGenTBAA.cpp

@@ -77,6 +77,10 @@ CodeGenTBAA::getTBAAInfo(QualType QTy) {
     }
   }
 
+  // For now, treat all pointers as equivalent to each other.
+  if (Ty->isPointerType())
+    return MetadataCache[Ty] = getTBAAInfoForNamedType("TBAA.pointer", Char);
+
   // For now, handle any other kind of type conservatively.
   return MetadataCache[Ty] = Char;
 }