diff options
Diffstat (limited to 'llvm/lib/Support/Triple.cpp')
-rw-r--r-- | llvm/lib/Support/Triple.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp index b14d6492b1e..c48be2d0cba 100644 --- a/llvm/lib/Support/Triple.cpp +++ b/llvm/lib/Support/Triple.cpp @@ -887,6 +887,12 @@ std::string Triple::normalize(StringRef Str) { } } + // Replace empty components with "unknown" value. + for (unsigned i = 0, e = Components.size(); i < e; ++i) { + if (Components[i].empty()) + Components[i] = "unknown"; + } + // Special case logic goes here. At this point Arch, Vendor and OS have the // correct values for the computed components. std::string NormalizedEnvironment; |