[cfe-commits] r42089 - /cfe/trunk/Sema/SemaDecl.cpp

Steve Naroff snaroff at apple.com
Tue Sep 18 13:07:30 PDT 2007


On Sep 18, 2007, at 12:47 PM, Chris Lattner wrote:

>> URL: http://llvm.org/viewvc/llvm-project?rev=42089&view=rev
>> Log:
>> alloca.h doesn't exist on Windows.
>
> Ah, thanks, we shouldn't use alloca at all.
>
> Steve, please change this:
>
> methodName = (char *) alloca (len + 1);
>
> To something like:
>
> llvm::SmallString<128> S;
> S.resize(len+1);
> ...
>

Will do...

snaroff

> Thanks,
>
> -Chris
>
>> Modified:
>>     cfe/trunk/Sema/SemaDecl.cpp
>>
>> Modified: cfe/trunk/Sema/SemaDecl.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/
>> SemaDecl.cpp?rev=42089&r1=42088&r2=42089&view=diff
>>
>> ===================================================================== 
>> =
>> ========
>> --- cfe/trunk/Sema/SemaDecl.cpp (original)
>> +++ cfe/trunk/Sema/SemaDecl.cpp Tue Sep 18 07:16:59 2007
>> @@ -22,8 +22,11 @@
>>  #include "clang/Lex/IdentifierTable.h"
>>  #include "clang/Basic/LangOptions.h"
>>  #include "clang/Basic/TargetInfo.h"
>> +#include "llvm/Config/config.h"
>>  #include "llvm/ADT/SmallSet.h"
>> +#if !defined(LLVM_ON_WIN32)
>>  #include <alloca.h>
>> +#endif
>>  using namespace clang;
>>
>>  Sema::DeclTy *Sema::isTypeName(const IdentifierInfo &II, Scope *S)
>> const {
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list