diff options
author | Shilei Tian <i@tianshilei.me> | 2025-01-14 20:12:29 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-14 20:12:29 -0500 |
commit | ebef44067bd0a2cd776b8baea39cffa7f602ce7b (patch) | |
tree | 3b597531ba23f0e6dafb16f03351aa04fa5ecf17 /clang/lib/CodeGen/BackendUtil.cpp | |
parent | b665dddd7070837b11714e28d841c9962a15601a (diff) | |
download | llvm-ebef44067bd0a2cd776b8baea39cffa7f602ce7b.zip llvm-ebef44067bd0a2cd776b8baea39cffa7f602ce7b.tar.gz llvm-ebef44067bd0a2cd776b8baea39cffa7f602ce7b.tar.bz2 |
[LLVM][Triple] Add an argument to specify canonical form to `Triple::normalize` (#122935)
Currently, the output of `Triple::normalize` can vary depending on how the
`Triple` object is constructed, producing a 3-field, 4-field, or even 5-field
string. However, there is no way to control the format of the output, as all
forms are considered canonical according to the LangRef.
This lack of control can be inconvenient when a specific format is required. To
address this, this PR introduces an argument to specify the desired format (3,
4, or 5 identifiers), with the default set to none to maintain the current
behavior. If the requested format requires more components than are available in
the actual `Data`, `"unknown"` is appended as needed.
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
0 files changed, 0 insertions, 0 deletions