Displaying 2 results from an estimated 2 matches for "nextstatictypeid".
Did you mean:
nextstatictypeid++
2009 Sep 12
0
[LLVMdev] [proposal] Extensible IR metadata
...shared LLVM
> libraries? These kinds of global unique IDs are notoriously difficult
> to get right. I'd suggest using a third-party unique-id library. Boost.UUID
> is one possibility but not the only one.
template<typename T>
class StaticTypeId {
static int id;
}
extern int NextStaticTypeId; // Initialized to 0. Possibly an atomic
type instead.
template<typename T> int StaticTypeId<T>::id = NextStaticTypeId++;
This relies on the compiler uniquing static member variables across
translation units, and I've never tested that across shared library
boundaries. The initia...
2009 Sep 11
4
[LLVMdev] [proposal] Extensible IR metadata
On Friday 11 September 2009 15:20, Jeffrey Yasskin wrote:
> I've got a suggestion for a refinement:
>
> Right now, we have classes like DILocation that wrap an MDNode* to
> provide more convenient access to it. It would be more convenient for
> users if instead of
>
> MDNode *DbgInfo = Inst->getMD(MDKind::DbgTag);
> Inst2->setMD(MDKind::DbgTag, DbgInfo);
>