[Chapel Merge] Make compiler updates required for LLVM-14

Branch: refs/heads/main
Revision: c9795ea
Author: daviditen
Link: Make compiler updates required for LLVM-14 by daviditen · Pull Request #19792 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #19792 from daviditen/llvm-14-compiler-updates

Make compiler updates required for LLVM-14

[reviewed by @dlongnecke-cray]

Update the compiler to work with LLVM-14 while continuing to work with other
already supported versions (11-13).

LLVM is moving toward opaque pointers, so PointerType::getElementType() is
deprecated. For now, switch to PointerType::getPointerElementType().
Eventually we'll need to switch to getting the type somewhere other than
from the pointer. Opaque Pointers — LLVM 15.0.0git documentation

In a few spots functions named "removeAttribute" or similar became

llvm::AttrBuilder now takes a required context argument in its constructor. Add
"#if ..." to only use that argument for version 14 and above.

A few header files were renamed or relocated.

Some codegen and target option flags were removed.

Updated util/chplenv/chpl_llvm.py to allow LLVM version 14.

Added a .skipif to skip execflags/bradc/gdbdash/declint.chpl with LLVM due
to a DWARF error in gdb.

Signed-off-by: David Iten daviditen@users.noreply.github.com

Modified Files:
A test/execflags/bradc/gdbddash/declint.skipif

M compiler/codegen/cg-expr.cpp
M compiler/codegen/cg-symbol.cpp
M compiler/codegen/codegen.cpp
M compiler/llvm/clangUtil.cpp
M compiler/llvm/llvmAggregateGlobalOps.cpp
M compiler/llvm/llvmGlobalToWide.cpp
M util/chplenv/chpl_llvm.py

Compare: https://github.com/chapel-lang/chapel/compare/ccf507ef6c47...c9795eae0ddd