In preparation for the testing for dcompute I was building against very recent trunk and hit the following.
```
/Users/nicholaswilson/d/ldc/gen/attributes.cpp:94:31: error: no member named 'getNumSlots' in 'llvm::AttributeList'
for (unsigned i = 0; i < os.getNumSlots(); ++i) {
~~ ^
/Users/nicholaswilson/d/ldc/gen/attributes.cpp:95:25: error: no member named 'getSlotIndex' in 'llvm::AttributeList'
unsigned index = os.getSlotIndex(i);
~~ ^
/Users/nicholaswilson/d/ldc/gen/attributes.cpp:96:55: error: no member named 'getSlotAttributes' in 'llvm::AttributeList'; did you mean
'getAttributes'?
set = set.addAttributes(gIR->context(), index, os.getSlotAttributes(i));
^~~~~~~~~~~~~~~~~
getAttributes
/Users/nicholaswilson/d/llvm/include/llvm/IR/Attributes.h:455:16: note: 'getAttributes' declared here
AttributeSet getAttributes(unsigned Index) const;
```
The patch silences this error although I'm not sure that it fixes it. I feel like it should work though.
And for sret args too, except for MSVC targets.
At least on Win64, the sret align attributes lead to ICEs for std.bitmanip
and std.uni (release only), when computing the known alignment in the LLVM
inliner pass:
Assertion failed: I->getParent()->getParent() ==
Q.CxtI->getParent()->getParent() && "Got assumption for the wrong function!",
file C:\LDC\llvm\lib\Analysis\ValueTracking.cpp, line 711