[llvm] r185993 - Un-break the buildbot by tweaking the indirection flag.

Eric Christopher echristo at gmail.com
Wed Jul 10 12:54:23 PDT 2013


On Wed, Jul 10, 2013 at 12:05 PM, Adrian Prantl <aprantl at apple.com> wrote:
>
>
> On Jul 10, 2013, at 12:01 PM, Eric Christopher <echristo at gmail.com> wrote:
>
>>> +        // Set the indirect flag if the type and the DIVariable's
>>> +        // indirect field are in disagreement: Indirectly-addressed
>>> +        // variables that are nonpointer types should be marked as
>>> +        // indirect, and VLAs should be marked as indirect eventhough
>>> +        // they are a pointer type.
>>> +        bool IsIndirect = DI->getAddress()->getType()->isPointerTy()
>>> +          ^ DIVar.isIndirect();
>>>
>>
>> This change bothers me. Why can't it be explicit what kind of location
>> we're expecting?
>
> The problem is the currently the semantic of the IsIndirect field in DIVariable doesn’t allow us to do that. Currently the flag indicates that "this variable is represented as a pointer”. If we change that to mean “is an indirect address”, then we could generate less ambiguous MDNodes in the frontend.
>

That seems like a reasonable change to me.

-eric




More information about the llvm-commits mailing list