[LLVMdev] TargetMachine::getTargetData

Chris Lattner sabre at nondot.org
Sat May 13 19:08:18 PDT 2006

On Sat, 13 May 2006, Vladimir Prus wrote:

> in LLVM CVS the above methods returns pointer to TargetData. It used to 
> return a reference before. What is semantic of 0 return value? Or 
> returning 0 is always a bug? If so, why pointer, and not reference is 
> returned?

We are currently in the process of making it optional, but right now it is 
required.  In practice, all targets will be *required* to provide it (it's 
hard to do much of anything without knowing how to lay out data :) ), but 
it will give us flexibility in the future, for mid-level passes that want 
to use data layout info if available, but gracefully degrade if not.



More information about the llvm-dev mailing list