[LLVMdev] api changes in llvm 2.4

Anton Korobeynikov asl at math.spbu.ru
Mon Oct 13 09:55:47 PDT 2008

Hello, Pekka

> 12) getSectionForFunction(*f) to f->getSection()
This is not a correct substitution. Function::getSection() returns
section set on function explicitely, getSectionForFunction() calculated
desired section name, where function should be emitted into (for
example, unique function name for linkonce stuff).

getSectionForFunction() was replaced with universal
TargetAsmInfo::SectionForGlobal() hook. See, for example,
X86ATTAsmPrinter::emitFunctionHeader() for usage and ELFTargetAsmInfo
class for example implementation of this hook. 
WBR, Anton Korobeynikov 

More information about the llvm-dev mailing list