>> I realise that the DataTypes.h.in part might be controversial. Also,
>> there's probably a better place to put it, but I'm not sure
where.
>
> I didn't apply this part. What problems does it cause to not have
> this? Can we fix uses of max and min?
I get these errors in lib:
.../lib/Analysis/ValueTracking.cpp:162: error: no matching function
for call to 'min(unsigned int&, uint32_t&)'
.../lib/Analysis/ValueTracking.cpp:163: error: no matching function
for call to 'min(unsigned int&, uint32_t&)'
.../lib/Analysis/ValueTracking.cpp:358: error: no matching function
for call to 'min(unsigned int&, uint32_t)'
.../lib/Analysis/ValueTracking.cpp:469: error: no matching function
for call to 'min(unsigned int&, long unsigned int)'
.../lib/Analysis/ValueTracking.cpp:708: error: no matching function
for call to 'min(unsigned int&, uint32_t)'
.../lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1432: error: no matching
function for call to 'max(long unsigned int, unsigned int&)'
.../lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1747: error: no matching
function for call to 'min(unsigned int&, uint32_t)'
.../lib/CodeGen/SelectionDAG/SelectionDAG.cpp:2033: error: no matching
function for call to 'min(unsigned int&, uint32_t)'
I could try to fix this by changing the code to consistently use
either unsigned or uint32_t (which?), rather than both. Or by adding
casts at the point of calling min/max. What would you prefer?
Thanks,
Jay.