Beispiel #1
0
        public TypeReference GetOrCreate(CXCursor cursor)
        {
            var hash = libclang.clang_hashCursor(cursor);

            if (m_typeMap.TryGetValue(hash, out TypeReference type))
            {
                // この型がTypedefなどから参照されている回数
                ++type.Count;
            }
            else
            {
                type = new TypeReference(cursor.CursorHashLocation(), null);
                m_typeMap.Add(hash, type);
            }

            return(type);
        }