aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorAndrew Savonichev <andrew.savonichev@intel.com>2018-10-29 11:14:01 +0000
committerAndrew Savonichev <andrew.savonichev@intel.com>2018-10-29 11:14:01 +0000
commit52d674d97499325d2c77dbcb67262c0cd1cde0b2 (patch)
treee8d1d56e0c7588a1090aa5f23709bbfeb7a7abe8 /llvm/tools/llvm-objdump/llvm-objdump.cpp
parent7a0841ef2f597d3f7bc36385288aedbd781cb80c (diff)
downloadllvm-52d674d97499325d2c77dbcb67262c0cd1cde0b2.zip
llvm-52d674d97499325d2c77dbcb67262c0cd1cde0b2.tar.gz
llvm-52d674d97499325d2c77dbcb67262c0cd1cde0b2.tar.bz2
[OpenCL] Fix serialization of OpenCLExtensionDecls
Summary: I recently discovered that adding the following code into `opencl-c.h` causes failure of `test/Headers/opencl-c-header.cl`: ``` #pragma OPENCL EXTENSION cl_my_ext : begin void cl_my_ext_foobarbaz(); #pragma OPENCL EXTENSIOn cl_my_ext : end ``` Clang crashes at the assertion is `ASTReader::getGlobalSubmoduleID()`: ``` assert(I != M.SubmoduleRemap.end() && "Invalid index into submodule index remap"); ``` The root cause of the problem that to deserialize `OPENCL_EXTENSION_DECLS` section `ASTReader` needs to deserialize a Decl contained in it. In turn, deserializing a Decl requires information about whether this declaration is part of a (sub)module, but this information is not read yet because it is located further in a module file. Reviewers: Anastasia, yaxunl, JDevlieghere Reviewed By: Anastasia Subscribers: sidorovd, cfe-commits, asavonic Differential Revision: https://reviews.llvm.org/D53200 llvm-svn: 345497
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions