LLVM backend for 6502
Go to file
Rafael Espindola 68016e0a6e Use the DiagnosticHandler to print diagnostics when reading bitcode.
The bitcode reading interface used std::error_code to report an error to the
callers and it is the callers job to print diagnostics.

This is not ideal for error handling or diagnostic reporting:

* For error handling, all that the callers care about is 3 possibilities:
  * It worked
  * The bitcode file is corrupted/invalid.
  * The file is not bitcode at all.

* For diagnostic, it is user friendly to include far more information
  about the invalid case so the user can find out what is wrong with the
  bitcode file. This comes up, for example, when a developer introduces a
  bug while extending the format.

The compromise we had was to have a lot of error codes.

With this patch we use the DiagnosticHandler to communicate with the
human and std::error_code to communicate with the caller.

This allows us to have far fewer error codes and adds the infrastructure to
print better diagnostics. This is so because the diagnostics are printed when
he issue is found. The code that detected the problem in alive in the stack and
can pass down as much context as needed. As an example the patch updates
test/Bitcode/invalid.ll.

Using a DiagnosticHandler also moves the fatal/non-fatal error decision to the
caller. A simple one like llvm-dis can just use fatal errors. The gold plugin
needs a bit more complex treatment because of being passed non-bitcode files. An
hypothetical interactive tool would make all bitcode errors non-fatal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225562 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-10 00:07:30 +00:00
autoconf [multilib] Add support to the autoconf build to substitute 2014-12-29 11:58:17 +00:00
bindings [OCaml] [cmake] Use LLVM_LIBRARY_DIR instead of LLVM_LIBRARY_OUTPUT_INTDIR. 2014-12-30 03:24:07 +00:00
cmake Reverting r225319; since there is a folder named Examples, attempting to add a target of the same name causes problems for IDEs like Visual Studio. 2015-01-07 14:47:12 +00:00
docs ReleaseNotes.rst: these are for 3.6 2015-01-09 00:21:26 +00:00
examples Manually specify the folder that Kaleidescope should reside in for CMake-produced solutions that care about such things (like MSVC). This takes the Kaleidescope target out of the root solution folder and places it into the Examples folder where it belongs. 2015-01-07 14:26:07 +00:00
include Use the DiagnosticHandler to print diagnostics when reading bitcode. 2015-01-10 00:07:30 +00:00
lib Use the DiagnosticHandler to print diagnostics when reading bitcode. 2015-01-10 00:07:30 +00:00
projects [cmake] Use the external project machinery for libcxxabi so that it can 2014-07-25 10:27:40 +00:00
test Use the DiagnosticHandler to print diagnostics when reading bitcode. 2015-01-10 00:07:30 +00:00
tools Use the DiagnosticHandler to print diagnostics when reading bitcode. 2015-01-10 00:07:30 +00:00
unittests IR: Add MDNode::getDistinct() 2015-01-07 22:24:46 +00:00
utils IR: Add 'distinct' MDNodes to bitcode and assembly 2015-01-08 22:38:29 +00:00
.arcconfig Updated phabricator server. 2014-04-07 03:57:04 +00:00
.clang-format Test commit. 2014-03-02 13:08:46 +00:00
.clang-tidy Enable display of compiler diagnostics in clang-tidy by default. 2014-10-29 17:29:38 +00:00
.gitignore [git] Mark the llgo directory in the LLVM gitignore. 2015-01-07 21:08:54 +00:00
CMakeLists.txt [py3] Teach the CMake build to reject Python versions older than 2.7. 2014-12-29 19:36:05 +00:00
CODE_OWNERS.TXT Add myself as SystemZ code owner 2014-12-18 19:27:50 +00:00
configure [multilib] Add support to the autoconf build to substitute 2014-12-29 11:58:17 +00:00
CREDITS.TXT Rise from the dead and update personal info 2014-08-25 17:51:04 +00:00
LICENSE.TXT Remove projects/sample. 2014-03-12 22:40:22 +00:00
llvm.spec.in
LLVMBuild.txt Remove the very substantial, largely unmaintained legacy PGO 2013-10-02 15:42:23 +00:00
Makefile [configure/make] Propagate names of build host tools when making BuildTools 2014-03-25 21:45:41 +00:00
Makefile.common Makefile.common: Update a description, s/Source/SOURCES/ , according to MakefileGuide.html#control-variables . 2012-12-07 01:43:23 +00:00
Makefile.config.in Add a check for misbehaving -Wcomment from gcc-4.7 and add 2014-11-05 00:35:15 +00:00
Makefile.rules Add a check for misbehaving -Wcomment from gcc-4.7 and add 2014-11-05 00:35:15 +00:00
README.txt Test commit. 2015-01-07 22:07:33 +00:00

Low Level Virtual Machine (LLVM)
================================

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

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.