If I've understood recent conversations on llvm-dev/commits, there is a desire to transition all const llvm::Type references to non-const llvm::Type references - I'm assuming this is because llvm::Type is now immutable anyway it's just simpler to refer by non-const. <br>
<br>To that end I've attached a patch to do this universally (for verficiation I did this with the following sed:<br> sed -ie 's/const \(llvm::\)\?\(Integer\|Function\|Composite\|Sequential\|Struct\|Array\|Pointer\|Vector\|\)\?Type\(\W\|$\)/\1\2Type\3/g'<br>
Except in clang I only used the fully qualified name (removing the optionality of the llvm:: group in the above regex) since there's a clang::Type too) & made manual changes to Types.h, DerivedTypes.h, and Types.cpp. Some functions that could be const are not - but would require const overloads of other functions. Any functions returning Type* had to be non-const so that users would get the non-const Type* they require.<br>
<br>Everything seems to build (debug+asserts, x86-32) and check-lit passes.<br><br>If I've misunderstood the goal here, or there's some other way this should be approached, that's ok - I just thought I'd put this out there in case it'd be useful.<br>
<br><br><br>