search for: createsomeidmap

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

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 under some interpretation of rule wording it can be called static constr...
2016 Mar 09
2
"Do not use Static Constructors" LLVM Coding Standard rule question
...> 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 about it with >> -Wglobal-constructor flag. >> >> I'm asking because un...
2016 Mar 09
3
"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 f...