[LLVMdev] Finding the host datalayout

Daniel Dunbar daniel at zuster.org
Tue Jan 19 08:39:33 PST 2010


If you create a TargetMachine for the target, you can ask
getTargetData()->getStringRepresentation(). See
  llvm-gcc-4.2/gcc/llvm-backend.cpp:~499.

 - Daniel

On Mon, Jan 18, 2010 at 10:04 AM, Samuel Crow <samuraileumas at yahoo.com> wrote:
> Hello all,
>
> As we work the last few bugs out of our project for the last release, we need to find a way to set the default datalayout of the LLVM Assembly file we are generating to be that of the host machine.  I've seen options for target triples in the Doxygen but not the datalayout.  BTW, we're using version 2.6 of LLVM.
>
> --Sam
>
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>




More information about the llvm-dev mailing list