Mainly fixed compile/link issues that occurred after llvm-17.
Added conditions to avoid aborts that occurred after llvm-17.
All unit tests passed on llvm-10, 12, and 17.
Note: Disabled some tests that are failing in llvm-17. This is because there are some issues in UT, such as Instruction indexing mismatch, after changing CFLAndersAA which is unavailable in llvm-17 to AAManager.
So llvm-17 support might not be complete. If you have any issues in llvm-17, please let me know.