search for: getcpudefinesuffix

Displaying 4 results from an estimated 4 matches for "getcpudefinesuffix".

2011 Jul 21
4
[LLVMdev] Correct use of StringRef and Twine
...t, since it's returning into a ctor, this might be nicely optimized - so perhaps this is the "right way" to write this code. [diff attached] So then here's another example (can't find the exact piece of code I had been working on, but taking tools/clang/lib/Basic/Targets.cpp::getCPUDefineSuffix as an example anyway - just something using a StringSwitch, really). If this function were to take a const Twine& and pass it along to StringSwitch, ultimately StringSwitch (being the sink for the Twine - the code needing to read the individual character elements) would be responsible for alloc...
2011 Jul 22
0
[LLVMdev] Correct use of StringRef and Twine
...ll written, the Twine version could just do a resize/reserve once, then fill in the bytes. I don't know if Twine does that yet though. > So then here's another example (can't find the exact piece of code I > had been working on, but taking > tools/clang/lib/Basic/Targets.cpp::getCPUDefineSuffix as an example > anyway - just something using a StringSwitch, really). If this > function were to take a const Twine& and pass it along to > StringSwitch, ultimately StringSwitch (being the sink for the Twine - > the code needing to read the individual character elements) would be &...
2011 Jul 19
0
[LLVMdev] Correct use of StringRef and Twine
On Jul 18, 2011, at 12:38 PM, David Blaikie wrote: > I'm attempting to do some amount of mass migration from const std::string& (& const char*) to StringRef. Great! > In doing so I stumbled across the fact that while StringRef has no op+ to speak of (well, it has += and I added a manual StringRef+std::string and std::string+StringRef for now - though I'm thinking perhaps
2011 Jul 18
3
[LLVMdev] Correct use of StringRef and Twine
I'm attempting to do some amount of mass migration from const std::string& (& const char*) to StringRef. In doing so I stumbled across the fact that while StringRef has no op+ to speak of (well, it has += and I added a manual StringRef+std::string and std::string+StringRef for now - though I'm thinking perhaps they can be skipped in favor of Twine operations), Twine does provide a