[cfe-commits] r97693 - in /cfe/trunk: include/clang/CodeGen/ModuleBuilder.h lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/CodeGen/ModuleBuilder.cpp lib/Frontend/CodeGenAction.cpp

Daniel Dunbar daniel at zuster.org
Thu Mar 4 07:18:43 PST 2010


Hi John,

On Wed, Mar 3, 2010 at 5:04 PM, Fariborz Jahanian <fjahanian at apple.com> wrote:
> I have no ideas if this is causing it. But Coverage/targets.c is
> failing on me after an update.
>
> - Fariborz
>
> On Mar 3, 2010, at 4:23 PM, John McCall wrote:
>
>> Author: rjmccall
>> Date: Wed Mar  3 18:23:29 2010
>> New Revision: 97693
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=97693&view=rev
>> Log:
>> Create a TargetMachine whenever we create a CodeGenAction.  The
>> codegen of
>> some builtins will rely on target knowledge.

We really do not want to do this. Please leave this out, at least
until we can discuss this in person.

For now I would much rather deal with the problem this is solving by
adding target specific hooks to provide the necessary bits of
information.

In general:
  1. Clang should not depend on having LLVM codegen support for a
particular backend in order to emit-llvm for that backend.
  2. We should never use a TargetMachine, except to do actual codegen.

We may eventually need to do some refactoring in LLVM to support these
goals, but I would prefer to solve such problems with target specific
hooks (in Clang), than to introduce a dependency on the LLVM
TargetMachine. This may mean duplicating some small bits of
information, but I still prefer it.

 - Daniel

>>
>> Modified:
>>    cfe/trunk/include/clang/CodeGen/ModuleBuilder.h
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>




More information about the cfe-commits mailing list