Skip to content

Commit b9f11c8

Browse files
committed
[Driver] Don't use Classic Flang tools for LLVM IR input
LLVM IR input should not be acceptable for Classic Flang tools. This bug was caused by an incorrect merge conflict resolution when upgrading to LLVM 15.
1 parent de44691 commit b9f11c8

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

clang/lib/Driver/Types.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,15 @@ bool types::isAcceptedByFlang(ID Id) {
175175
case TY_PP_F_FreeForm:
176176
case TY_F_FixedForm:
177177
case TY_PP_F_FixedForm:
178+
return true;
178179
#else
179180
case TY_Fortran:
180181
case TY_PP_Fortran:
181-
#endif
182182
return true;
183183
case TY_LLVM_IR:
184184
case TY_LLVM_BC:
185185
return true;
186+
#endif
186187
}
187188
}
188189

clang/test/Driver/flang/Inputs/llvm-ir-input.ll

Whitespace-only changes.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
! Check that LLVM IR input is passed to clang instead of flang1.
2+
3+
! REQUIRES: classic_flang
4+
! RUN: %clang --driver-mode=flang -S %S/Inputs/llvm-ir-input.ll -### 2>&1 | FileCheck %s
5+
6+
! CHECK-NOT: flang1
7+
! CHECK: "{{.*}}clang{{.*}}" "-cc1"

0 commit comments

Comments
 (0)