14 feb 2009 kl. 14.16 skrev Mike Stump:

> Author: mrs
> Date: Sat Feb 14 16:16:35 2009
> New Revision: 64570
>
> URL: http://llvm.org/viewvc/llvm-project?rev=64570&view=rev
> Log:
> Generate the helper function for blocks.  Now basic codegen is
> starting to work for blocks.
>

Cool!
>
> -llvm::Constant *CodeGenModule::GetAddrOfGlobalBlock(const BlockExpr  
> *BE) {
> +llvm::Constant *
> +CodeGenModule::GetAddrOfGlobalBlock(const BlockExpr *BE,  
> std::string n) {

Can't this be a const char* or at least a const string reference?
>

> +    if (const NamedDecl *ND = dyn_cast<NamedDecl>(CGF->CurFuncDecl))
> +      Name = ND->getNameAsString().c_str();
> +    return CGM.GetAddrOfGlobalBlock(E, Name);

If it was const char* you could use getNameAsCString() which wouldn't  
create a string copy.

Anders

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to