aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorVolodymyr Sapsai <vsapsai@apple.com>2019-03-01 02:15:39 +0000
committerVolodymyr Sapsai <vsapsai@apple.com>2019-03-01 02:15:39 +0000
commit93317d82daf864956ae0608594ee94293e3a4257 (patch)
tree19ee56e895c5f39b60e9048777433d02c8716b29 /llvm/lib/Support/CommandLine.cpp
parentdc3870d64dfec1d332894b373357cc62ae6e2c01 (diff)
downloadllvm-93317d82daf864956ae0608594ee94293e3a4257.zip
llvm-93317d82daf864956ae0608594ee94293e3a4257.tar.gz
llvm-93317d82daf864956ae0608594ee94293e3a4257.tar.bz2
[CodeGen] Fix calling llvm.var.annotation outside of a basic block.
When we have an annotated local variable after a function returns, we generate IR that fails verification with the error > Instruction referencing instruction not embedded in a basic block! And it means that bitcast referencing alloca doesn't have a parent basic block. Fix by checking if we are at an unreachable point and skip emitting annotations. This approach is similar to the way we emit variable initializer and debug info. rdar://problem/46200420 Reviewers: rjmccall Reviewed By: rjmccall Subscribers: aprantl, jkorous, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D58147 llvm-svn: 355166
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
0 files changed, 0 insertions, 0 deletions