[llvm-commits] [llvm-gcc-4.2] r49017 - in /llvm-gcc-4.2/trunk/gcc: config/i386/llvm-i386-target.h config/i386/llvm-i386.cpp config/rs6000/llvm-rs6000.cpp config/rs6000/rs6000.h llvm-abi.h
Duncan Sands
baldrick at free.fr
Fri Apr 4 06:55:41 PDT 2008
Hi Devang,
> > Use of current_function_decl is bogus because the ABI logic is also
> > used when calling a function, in which case it is the declaration of
> > the callee that you need here! I understand that this is not your
> > fault: the bug was already present in the original code. But since
> > you
> > seem to be working on this stuff, maybe you could fix this while
> > there.
>
> good catch. In general, current function handling could use
> clarification and simplification during llvm conversion, but for now I
> addressed this particular case.
I agree. About your patch: in ConvertFunctionType I just noticed
ABIConverter.HandleReturnType(TREE_TYPE(type), current_function_decl,
decl ? DECL_BUILT_IN(decl) : false);
Since ConvertFunctionType is used by calls to find the callee type, using
current_function_decl here has to be wrong.
Ciao,
Duncan.
More information about the llvm-commits
mailing list