[all-commits] [llvm/llvm-project] ebef44: [LLVM][Triple] Add an argument to specify canonica...
Shilei Tian via All-commits
all-commits at lists.llvm.org
Tue Jan 14 17:12:51 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ebef44067bd0a2cd776b8baea39cffa7f602ce7b
https://github.com/llvm/llvm-project/commit/ebef44067bd0a2cd776b8baea39cffa7f602ce7b
Author: Shilei Tian <i at tianshilei.me>
Date: 2025-01-14 (Tue, 14 Jan 2025)
Changed paths:
M llvm/include/llvm/TargetParser/Triple.h
M llvm/lib/TargetParser/Triple.cpp
M llvm/unittests/TargetParser/TripleTest.cpp
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list