[compiler-rt] r262827 - [Fix r262785] Fix missing declaration when COMPILER_RT_BOOL_CMPXCHG was used but InstrProfilingUtil.h wasn't included.

Filipe Cabecinhas via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 7 11:11:24 PST 2016


How is the header self-contained and the function declared is you don't
include the other header, then?

Thank you,

  Filipe

On Monday, 7 March 2016, Xinliang David Li via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

>
>
> On Mon, Mar 7, 2016 at 5:42 AM, Filipe Cabecinhas via llvm-commits <
> llvm-commits at lists.llvm.org
> <javascript:_e(%7B%7D,'cvml','llvm-commits at lists.llvm.org');>> wrote:
>
>> Author: filcab
>> Date: Mon Mar  7 07:42:17 2016
>> New Revision: 262827
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=262827&view=rev
>> Log:
>> [Fix r262785] Fix missing declaration when COMPILER_RT_BOOL_CMPXCHG was
>> used but InstrProfilingUtil.h wasn't included.
>>
>> Also fixed declaration which still had the pre-r262788 name.
>>
>> Modified:
>>     compiler-rt/trunk/lib/profile/InstrProfilingPort.h
>>     compiler-rt/trunk/lib/profile/InstrProfilingUtil.h
>>
>> Modified: compiler-rt/trunk/lib/profile/InstrProfilingPort.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingPort.h?rev=262827&r1=262826&r2=262827&view=diff
>>
>> ==============================================================================
>> --- compiler-rt/trunk/lib/profile/InstrProfilingPort.h (original)
>> +++ compiler-rt/trunk/lib/profile/InstrProfilingPort.h Mon Mar  7
>> 07:42:17 2016
>> @@ -52,6 +52,7 @@
>>    __sync_bool_compare_and_swap(Ptr, OldV, NewV)
>>  #endif
>>  #else /* COMPILER_RT_HAS_ATOMICS != 1 */
>> +#include "InstrProfilingUtil.h"
>>
>
> This include is not needed -- perhaps change it to a comment.
>
> David
>
>
>
>>  #define COMPILER_RT_BOOL_CMPXCHG(Ptr, OldV, NewV)
>>       \
>>    lprofBoolCmpXchg((void **)Ptr, OldV, NewV)
>>  #endif
>>
>> Modified: compiler-rt/trunk/lib/profile/InstrProfilingUtil.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingUtil.h?rev=262827&r1=262826&r2=262827&view=diff
>>
>> ==============================================================================
>> --- compiler-rt/trunk/lib/profile/InstrProfilingUtil.h (original)
>> +++ compiler-rt/trunk/lib/profile/InstrProfilingUtil.h Mon Mar  7
>> 07:42:17 2016
>> @@ -22,6 +22,6 @@ static inline char *getenv(const char *n
>>
>>  int lprofGetHostName(char *Name, int Len);
>>
>> -unsigned BoolCmpXchg(void **Ptr, void *OldV, void *NewV);
>> +unsigned lprofBoolCmpXchg(void **Ptr, void *OldV, void *NewV);
>>
>>  #endif  /* PROFILE_INSTRPROFILINGUTIL_H */
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> <javascript:_e(%7B%7D,'cvml','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/20160307/e4ed0e86/attachment.html>


More information about the llvm-commits mailing list