search for: findnameid

Displaying 3 results from an estimated 3 matches for "findnameid".

2016 Mar 09
2
"Do not use Static Constructors" LLVM Coding Standard rule question
Hi, I'm new here and have a question about the rule in title. Is the following use case also prohibited? int findNameId(StringRef Name) { static StringMap<int> Map = createSomeIDMap(); return Map.lookup(Name); }; It seems it isn't influence startup time and doesn't create initialization order problems. Clang isn't complaining about it with -Wglobal-constructor flag. I'm asking because u...
2016 Mar 09
2
"Do not use Static Constructors" LLVM Coding Standard rule question
...e." > > On Tue, Mar 8, 2016 at 10:52 PM, valery pykhtin via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hi, >> >> I'm new here and have a question about the rule in title. Is the >> following use case also prohibited? >> >> int findNameId(StringRef Name) >> { >> static StringMap<int> Map = createSomeIDMap(); >> return Map.lookup(Name); >> }; >> >> It seems it isn't influence startup time and doesn't create >> initialization order problems. Clang isn't complaining abou...
2016 Mar 09
3
"Do not use Static Constructors" LLVM Coding Standard rule question
...in via llvm-dev < >>> llvm-dev at lists.llvm.org> wrote: >>> >>>> Hi, >>>> >>>> I'm new here and have a question about the rule in title. Is the >>>> following use case also prohibited? >>>> >>>> int findNameId(StringRef Name) >>>> { >>>> static StringMap<int> Map = createSomeIDMap(); >>>> return Map.lookup(Name); >>>> }; >>>> >>>> It seems it isn't influence startup time and doesn't create >>>> initial...