File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
llvm/lib/TargetParser/Unix Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 1+ // Test for the Triple constructor ambiguity fix on AIX
2+ // This test verifies that the default target triple is correctly resolved
3+ // and doesn't fall back to "unknown" due to constructor ambiguity.
4+
5+ // REQUIRES: system-aix
6+ // RUN: %clang -v %s -c 2>&1 | FileCheck %s --check-prefix=CHECK-TARGET
7+
8+ // Test that the target triple contains AIX and is not "unknown"
9+ // The target should be something like "powerpc-ibm-aix7.3.0.0"
10+ // CHECK-TARGET: Target: {{.*}}aix{{.*}}
11+ // CHECK-TARGET-NOT: error: unknown target triple 'unknown'
12+
13+ int main () {
14+ return 0 ;
15+ }
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ static std::string updateTripleOSVersion(std::string TargetTripleString) {
5555 // On AIX, the AIX version and release should be that of the current host
5656 // unless if the version has already been specified.
5757 if (Triple (LLVM_HOST_TRIPLE).getOS () == Triple::AIX) {
58- Triple TT ( std::move ( TargetTripleString)) ;
58+ Triple TT{ TargetTripleString} ;
5959 if (TT.getOS () == Triple::AIX && !TT.getOSMajorVersion ()) {
6060 struct utsname name;
6161 if (uname (&name) != -1 ) {
You can’t perform that action at this time.
0 commit comments