First time check was introduced in `fa3ab4599d717feedbb83e08e7f654913942520b` to work around a debug-info generation bug in Clang. This bug was fixed in Clang-4. The check has since been adjusted (first in `808ff186f6a6ba1fd38cc7e00697cd82f4afe540`, and then most recently in `370db9c62910195e664e82dde6f0adb3e255a4fd`). This check is getting quite convoluted, and all it does is turn an `array[1]` into an `array[0]` type when it is deemed correct. At this point the workaround probably never fires, apart from actually valid codegen. This patch removes the special conditions and emits the error specifically in those cases where we know the DWARF is malformed. Added some shell tests for the error case.
The LLVM Compiler Infrastructure
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called "LLVM". This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Getting the Source Code and Building LLVM
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Getting in touch
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.