[llvm] r250459 - Replace a forward declaration with an #include.

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 16 10:18:40 PDT 2015


On Fri, Oct 16, 2015 at 10:14 AM Adrian Prantl <aprantl at apple.com> wrote:

>
> On Oct 16, 2015, at 9:56 AM, Eric Christopher <echristo at gmail.com> wrote:
>
> Eh? Why?
>
>
> The file forward-declares DebugLocStream and then uses the inner type
> (DebugLocStream::ListBuilder *) in an argument list. As noted in the commit
> message, clang complains about this when building with modules.
>
>
This seems odd.


> I’m unsure whether this is supposed to work or if I was just working
> around a bug in clang. If this is indeed a clang bug, we should fix it
> instead.
>

Right. This is what I'm asking.

-eric


>
> -- adrian
>
>
> -eric
>
> On Thu, Oct 15, 2015 at 2:00 PM Adrian Prantl via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: adrian
>> Date: Thu Oct 15 15:58:55 2015
>> New Revision: 250459
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=250459&view=rev
>> Log:
>> Replace a forward declaration with an #include.
>> When building with modules the forward-declared inner class
>> DebugLocStream::ListBuilder causes clang to fall over.
>>
>> Modified:
>>     llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h
>>
>> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h?rev=250459&r1=250458&r2=250459&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h (original)
>> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h Thu Oct 15 15:58:55
>> 2015
>> @@ -9,6 +9,8 @@
>>
>>  #ifndef LLVM_LIB_CODEGEN_ASMPRINTER_DEBUGLOCENTRY_H
>>  #define LLVM_LIB_CODEGEN_ASMPRINTER_DEBUGLOCENTRY_H
>> +
>> +#include "DebugLocStream.h"
>>  #include "llvm/ADT/SmallString.h"
>>  #include "llvm/IR/Constants.h"
>>  #include "llvm/IR/DebugInfo.h"
>> @@ -17,7 +19,6 @@
>>
>>  namespace llvm {
>>  class AsmPrinter;
>> -class DebugLocStream;
>>
>>  /// \brief This struct describes location entries emitted in the
>> .debug_loc
>>  /// section.
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151016/a2fd71d9/attachment.html>


More information about the llvm-commits mailing list