[LLVMdev] Regular Expression lib support
Török Edwin
edwintorok at gmail.com
Sun Aug 30 01:35:25 PDT 2009
On 2009-08-30 03:55, Chris Lattner wrote:
>
> On Aug 28, 2009, at 1:53 AM, Daniel Dunbar wrote:
>
>> Nice!
>>
>> This looks good to me but probably Chris or someone else should sign
>> off on it.
>
> This seems ok to me, please commit. One minor comment:
Committed.
It would be useful if someone could test if this works on Windows, the
msvc buildbot was all red before my commit, failing here:
G:\public\zorg\buildbot\osuosl\slave\clang-i686-xp-msvc9\llvm\include\llvm/Support/IRBuilder.h(133) : error C3861: 'InsertHelper': identifier not found
>
> +++ b/lib/Support/Regex.cpp
>
> + // Allocate pmatch with at least one element.
> + pmatch = new llvm_regmatch_t[nmatch > 0 ? nmatch : 1];
> + pmatch[0].rm_so = 0;
> + pmatch[0].rm_eo = String.size();
>
> Can this be a smallvector to avoid a heap allocation on every match?
Yes, I changed it to use SmallVector.
Best regards,
--Edwin
More information about the llvm-dev
mailing list