mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
e9e1661fa2
-Wframe-larger-than= is an interesting warning; we can't know the frame size until PrologueEpilogueInsertion (PEI); very late in the compilation pipeline. -Wframe-larger-than= was propagated through CC1 as an -mllvm flag, then was a cl::opt in LLVM's PEI pass; this meant it was dropped during LTO and needed to be re-specified via -plugin-opt. Instead, make it part of the IR proper as a module level attribute, similar to D103048. Introduce -fwarn-stack-size CC1 option. Reviewed By: rsmith, qcolombet Differential Revision: https://reviews.llvm.org/D103928
17 lines
518 B
LLVM
17 lines
518 B
LLVM
; RUN: split-file %s %t
|
|
; RUN: llvm-link %t/main.ll %t/match.ll
|
|
; RUN: not llvm-link %t/main.ll %t/mismatch.ll 2>&1 | \
|
|
; RUN: FileCheck --check-prefix=CHECK-MISMATCH %s
|
|
|
|
; CHECK-MISMATCH: error: linking module flags 'warn-stack-size': IDs have conflicting values
|
|
|
|
;--- main.ll
|
|
!llvm.module.flags = !{!0}
|
|
!0 = !{i32 1, !"warn-stack-size", i32 80}
|
|
;--- match.ll
|
|
!llvm.module.flags = !{!0}
|
|
!0 = !{i32 1, !"warn-stack-size", i32 80}
|
|
;--- mismatch.ll
|
|
!llvm.module.flags = !{!0}
|
|
!0 = !{i32 1, !"warn-stack-size", i32 81}
|