reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

unittests/AsmParser/AsmParserTest.cpp
  178   Ty = parseType("i32", Error, M, &Mapping);
  179   ASSERT_TRUE(Ty);
  180   ASSERT_TRUE(Ty->isIntegerTy());
  181   ASSERT_TRUE(Ty->getPrimitiveSizeInBits() == 32);
  184   Ty = parseType("i13", Error, M, &Mapping);
  185   ASSERT_TRUE(Ty);
  186   ASSERT_TRUE(Ty->isIntegerTy());
  187   ASSERT_TRUE(Ty->getPrimitiveSizeInBits() == 13);
  190   Ty = parseType("float", Error, M, &Mapping);
  191   ASSERT_TRUE(Ty);
  192   ASSERT_TRUE(Ty->isFloatTy());
  194   Ty = parseType("double", Error, M, &Mapping);
  195   ASSERT_TRUE(Ty);
  196   ASSERT_TRUE(Ty->isDoubleTy());
  200   Ty = parseType("%st", Error, M, &Mapping);
  201   ASSERT_TRUE(Ty);
  202   ASSERT_TRUE(Ty->isStructTy());
  205   StructType *ST = cast<StructType>(Ty);
  208     Ty = ST->getElementType(i);
  209     ASSERT_TRUE(Ty->isIntegerTy());
  210     ASSERT_TRUE(Ty->getPrimitiveSizeInBits() == 32);
  214   Ty = parseType("%0", Error, M, &Mapping);
  215   ASSERT_TRUE(Ty);
  216   ASSERT_TRUE(Ty->isStructTy());
  219   ST = cast<StructType>(Ty);
  222     Ty = ST->getElementType(i);
  223     ASSERT_TRUE(Ty->isIntegerTy());
  224     ASSERT_TRUE(Ty->getPrimitiveSizeInBits() == 32);
  228   Ty = parseType("<5 x i32>", Error, M, &Mapping);
  229   ASSERT_TRUE(Ty);
  230   ASSERT_TRUE(Ty->isVectorTy());
  233   VectorType *VT = cast<VectorType>(Ty);
  236   Ty = VT->getElementType();
  237   ASSERT_TRUE(Ty->isIntegerTy());
  238   ASSERT_TRUE(Ty->getPrimitiveSizeInBits() == 32);
  241   Ty = parseType("%opaque", Error, M, &Mapping);
  242   ASSERT_TRUE(Ty);
  243   ASSERT_TRUE(Ty->isStructTy());
  245   ST = cast<StructType>(Ty);
  250   Ty = parseType("i32*", Error, M, &Mapping);
  251   ASSERT_TRUE(Ty);
  252   ASSERT_TRUE(Ty->isPointerTy());
  254   PointerType *PT = cast<PointerType>(Ty);
  255   Ty = PT->getElementType();
  256   ASSERT_TRUE(Ty->isIntegerTy());
  257   ASSERT_TRUE(Ty->getPrimitiveSizeInBits() == 32);
  260   Ty = parseType("i32**", Error, M, &Mapping);
  261   ASSERT_TRUE(Ty);
  262   ASSERT_TRUE(Ty->isPointerTy());
  264   PT = cast<PointerType>(Ty);
  265   Ty = PT->getElementType();
  266   ASSERT_TRUE(Ty->isPointerTy());
  268   PT = cast<PointerType>(Ty);
  269   Ty = PT->getElementType();
  270   ASSERT_TRUE(Ty->isIntegerTy());
  271   ASSERT_TRUE(Ty->getPrimitiveSizeInBits() == 32);
  274   Ty = parseType("i32 garbage", Error, M, &Mapping);
  275   ASSERT_TRUE(!Ty);