aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm-mca
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2018-08-08 22:23:57 +0000
committerPetr Hosek <phosek@chromium.org>2018-08-08 22:23:57 +0000
commit85ffa199e1c47ea192025eeefbbcd5124e483373 (patch)
treef19832095719675644f0ca7cc0af81ce3f8338a0 /tools/llvm-mca
parente32dc0cc26cec88fb089f24868f98deac253b5df (diff)
[ADT] Normalize empty triple components
LLVM triple normalization is handling "unknown" and empty components differently; for example given "x86_64-unknown-linux-gnu" and "x86_64-linux-gnu" which should be equivalent, triple normalization returns "x86_64-unknown-linux-gnu" and "x86_64--linux-gnu". autoconf's config.sub returns "x86_64-unknown-linux-gnu" for both "x86_64-linux-gnu" and "x86_64-unknown-linux-gnu". This changes the triple normalization to behave the same way, replacing empty triple components with "unknown". This addresses PR37129. Differential Revision: https://reviews.llvm.org/D50219 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339294 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-mca')
-rw-r--r--tools/llvm-mca/llvm-mca.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/tools/llvm-mca/llvm-mca.cpp b/tools/llvm-mca/llvm-mca.cpp
index 897ff232a36..5b91f4a8e4d 100644
--- a/tools/llvm-mca/llvm-mca.cpp
+++ b/tools/llvm-mca/llvm-mca.cpp
@@ -180,7 +180,6 @@ static cl::opt<bool>
namespace {
const Target *getTarget(const char *ProgName) {
- TripleName = Triple::normalize(TripleName);
if (TripleName.empty())
TripleName = Triple::normalize(sys::getDefaultTargetTriple());
Triple TheTriple(TripleName);