Chris/Anton,

I don't understand why we need a subclass of Function for 
this? Can't we just derive an "Alias" class from a smart 
pointer to Value?

Then the Alias object is what is placed in the symbol 
table and the overhead only occurs if you use the feature.

Reid.

On Thu, 19 Apr 2007 23:03:45 +0400
  Anton Korobeynikov <[EMAIL PROTECTED]> wrote:
> Chris,
> 
>> Ok, does this also apply to functions with bodies?
> No. Declarations only. AsmParser takes care of this.
> 
>> If they can have bodies, why not just make this an 
>>instance variable  
>> in the Function class?  If the string is empty, there is 
>>no alias.
> :) This was my initial proposal (some week ago), you've 
>responded
> something like "this will be waste of space and memory, 
>since only few
> functions will use this feature".
> 
>> Ok, they should be fixed! :)
> Ok.
> 
>> void foo() alias bar {}
> This isn't allowed. foo acts as bar's mirror, so body of 
>foo is
> redefinition.
> 
>> Do the two functions (the extern of bar and the decl of 
>>foo) get  
>> linked up?  What happens if the foo declaration was a 
>>prototype with  
>> no body?
> They won't be linked. External functions can still call 
>foo();
> 
> -- 
> With best regards, Anton Korobeynikov.
> 
>Faculty of Mathematics & Mechanics, Saint Petersburg 
>State University.
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits@cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to