Global inline assembler blocks are merged before parsing, so no specific
authorJoerg Sonnenberger <joerg@bec.de>
Mon, 16 Mar 2015 17:54:54 +0000 (17:54 +0000)
committerJoerg Sonnenberger <joerg@bec.de>
Mon, 16 Mar 2015 17:54:54 +0000 (17:54 +0000)
commit1d3b431c98ef13e35a06ab6e69005983e6d2a030
tree4a227a79ed54d510a42ed3f5643a63fe6bdf1c07
parentf2929c9b032a0913aa8e0f81a949716e92da7070
Global inline assembler blocks are merged before parsing, so no specific
location data is available. If pragma handling wants to look up the
position, it finds the LLVM buffer and wants to compare it with the
special built-in buffer, failing badly. Extend to the special handling
of the built-in buffer to also check for the inline asm buffer. Expect
only a single asm buffer. Sort it between the built-in buffers and the
normal file buffers.

Fixes the assert part of PR 22576.

llvm-svn: 232389
clang/lib/Basic/SourceManager.cpp
clang/test/CodeGen/invalid_global_asm.c [new file with mode: 0644]