MCPcopy Create free account
hub / github.com/Samsung/UTopia / createPointerType

Method createPointerType

lib/type/Type.cpp:95–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95std::shared_ptr<Type>
96Type::createPointerType(const clang::QualType &T,
97 const clang::ASTContext &ASTCtx, llvm::Argument *A,
98 const TypeAnalysisReport *Report) {
99 auto Result = std::make_shared<Type>(Type::TypeID_Pointer);
100 if (!Result)
101 return nullptr;
102
103 Result->setPtrKind(Type::PtrKind::PtrKind_Normal);
104 clang::QualType PointeeT = util::getPointeeTy(T);
105 Result->setPointeeType(Type::createType(PointeeT, ASTCtx, A, Report));
106 Result->updateArrayInfoFromAST(T);
107 return Result;
108}
109
110void Type::updateArrayInfoFromAST(const clang::QualType &QT) {
111 assert(PtrInfo && "Unexpected Program State");

Callers

nothing calls this directly

Calls 4

getPointeeTyFunction · 0.85
setPtrKindMethod · 0.80
setPointeeTypeMethod · 0.80

Tested by

no test coverage detected