llvm/test/Transforms/FunctionImport/unnamed-globals.ll
Davide Italiano 33b82ff8c4 [ModuleSummaryAnalysis] Don't crash when referencing unnamed globals.
Instead, just be conservative as these are unfrequent enough. Thanks
to Peter Collingbourne for the discussion about this on IRC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295861 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-22 18:53:38 +00:00

11 lines
295 B
LLVM

; Make sure we don't crash when referencing an unnamed global.
; RUN: opt %s -module-summary-analysis -S
@0 = external global [1 x { i64 }]
define internal void @tinkywinky() {
call void @patatino(i64 ptrtoint ([1 x { i64 }]* @0 to i64), i64 4)
ret void
}
declare void @patatino(i64, i64)