[llvm-commits] [llvm] r135006 - in /llvm/trunk: include/llvm/Target/TargetAsmInfo.h lib/Target/TargetAsmInfo.cpp
Chris Lattner
clattner at apple.com
Wed Jul 13 00:02:33 PDT 2011
On Jul 12, 2011, at 11:25 PM, Bill Wendling wrote:
> On Jul 12, 2011, at 8:46 PM, Chris Lattner wrote:
>
>> On Jul 12, 2011, at 3:35 PM, Bill Wendling wrote:
>>
>>> Author: void
>>> Date: Tue Jul 12 17:35:01 2011
>>> New Revision: 135006
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=135006&view=rev
>>> Log:
>>> There is a cyclic dependency between MC and Target if this method is out-of-line.
>>
>> Why is MC including this header?
>>
> TargetAsmInfo.h is included in a lot of MC/*.cpp files:
>
> lib/MC/MCAsmStreamer.cpp:#include "llvm/Target/TargetAsmInfo.h"
> lib/MC/MCContext.cpp:#include "llvm/Target/TargetAsmInfo.h"
> lib/MC/MCDwarf.cpp:#include "llvm/Target/TargetAsmInfo.h"
> lib/MC/MCELFStreamer.cpp:#include "llvm/Target/TargetAsmInfo.h"
> lib/MC/MCMachOStreamer.cpp:#include "llvm/Target/TargetAsmInfo.h"
> lib/MC/MCObjectStreamer.cpp:#include "llvm/Target/TargetAsmInfo.h"
> lib/MC/MCStreamer.cpp:#include "llvm/Target/TargetAsmInfo.h"
> lib/MC/MCWin64EH.cpp:#include "llvm/Target/TargetAsmInfo.h"
>
> They use it to get sections, pointer sizes, and other queries.
This is a serious bug. MC stuff shouldn't be including Target stuff. This a clear layering violation. Evan, can you tackle this one too? :)
-Chris
More information about the llvm-commits
mailing list