Issue |
144332
|
Summary |
[clang] Improve ABI version handling in clang
|
Labels |
enhancement,
clang
|
Assignees |
|
Reporter |
Fznamznon
|
We have a language option for ABI-compatibility. The user may choose clang release version to generate code compatible with using flag `-fclang-abi-compat=` . Currently to bring a new version of known ABI, at least 3 different places need to be modified:
1. Add new value to the langopt enum:
https://github.com/llvm/llvm-project/blob/299a55a88fae4fc423c440436b2632d2a6bd800a/clang/include/clang/Basic/LangOptions.h#L171
2. Make sure it is handled here
https://github.com/llvm/llvm-project/blob/299a55a88fae4fc423c440436b2632d2a6bd800a/clang/lib/Frontend/CompilerInvocation.cpp#L3925
3. Make sure it is parsed correctly here
https://github.com/llvm/llvm-project/blob/299a55a88fae4fc423c440436b2632d2a6bd800a/clang/lib/Frontend/CompilerInvocation.cpp#L4479
So, it is at least 3 places that need to be updated every ~6 months when new release is branched. Some of the places are super easy to forget which will cause build fails like the bug resolved by https://github.com/llvm/llvm-project/pull/144109 several months after ClangABI::Ver20 was introduced.
It would be great to improve this.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs