Go to file
Volodymyr Sapsai 93317d82da [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
2019-03-01 02:15:39 +00:00
clang [CodeGen] Fix calling llvm.var.annotation outside of a basic block. 2019-03-01 02:15:39 +00:00
clang-tools-extra [clang-tidy] add OverrideMacro to modernize-use-override check 2019-02-28 20:00:48 +00:00
compiler-rt [hwasan] Disable vfork code when building w/o interceptors. 2019-03-01 02:06:58 +00:00
debuginfo-tests Set config.lit_tools_dir, which is needed by lit.llvm.initialize. 2018-11-06 21:54:27 +00:00
libclc Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
libcxx [libc++] Fix forgotten fclose() in unit test 2019-03-01 01:32:44 +00:00
libcxxabi [libcxxabi][CMake] Drop unused HandleOutOfTreeLLVM include 2019-02-18 20:58:06 +00:00
libunwind [CMake][libunwind] Define add_target_flags which is missing 2019-02-28 21:38:59 +00:00
lld ELF: Write .eh_frame_hdr explicitly after writing .eh_frame. 2019-02-28 23:11:35 +00:00
lldb Symbols.cpp in unittest moved too. 2019-02-28 23:37:28 +00:00
llgo Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
llvm [WebAssembly] Lower SIMD shifts since they are fixed in V8 2019-03-01 01:38:54 +00:00
openmp [OpenMP][OMPT] Distinguish different barrier kinds 2019-02-28 20:55:39 +00:00
parallel-libs Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
polly [opaque pointer types] Update calls to CreateCall to pass the function 2019-02-08 19:30:46 +00:00
pstl [pstl] Fix missing parallel policy guards 2019-03-01 01:26:35 +00:00
.arcconfig Update monorepo .arcconfig with new project callsign. 2019-01-31 14:34:59 +00:00
.clang-format Add .clang-tidy and .clang-format files to the toplevel of the 2019-01-29 16:43:16 +00:00
.clang-tidy Disable tidy checks with too many hits 2019-02-01 11:20:13 +00:00
README.md

README.md

The LLVM Compiler Infrastructure

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.