[llvm-commits] [llvm-gcc-4.2] r79551 - /llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp

Duncan Sands baldrick at free.fr
Fri Aug 21 02:53:25 PDT 2009


Hi Chris,

> Does this work with the gcc --target configure option?

there should be no functionality change.  Look at the patch:

>    TheModule->setTargetTriple(TargetTriple);
>    
>    TheTypeConverter = new TypeConverter();
> 
>    // Create the TargetMachine we will be generating code with.
>    // FIXME: Figure out how to select the target and pass down subtarget info.
>    std::string Err;
> -  std::string Triple = TheModule->getTargetTriple();

There is a call to setTargetTriple(TargetTriple) followed by a
call to getTargetTriple(), assigned to Triple.  This will just
result in Triple having the same value as TargetTriple.  The
patch thus replaces all uses of Triple with TargetTriple.  Did
I miss something?

Ciao,

Duncan.



More information about the llvm-commits mailing list