llvm-project/llvm/test
Kevin Enderby 81e8b7d949 Thread Expected<...> up from libObject’s getName() for symbols to allow llvm-objdump to produce a good error message.
Produce another specific error message for a malformed Mach-O file when a symbol’s
string index is past the end of the string table.  The existing test case in test/Object/macho-invalid.test
for macho-invalid-symbol-name-past-eof now reports the error with the message indicating
that a symbol at a specific index has a bad sting index and that bad string index value.
 
Again converting interfaces to Expected<> from ErrorOr<> does involve
touching a number of places. Where the existing code reported the error with a
string message or an error code it was converted to do the same.  There is some
code for this that could be factored into a routine but I would like to leave that for
the code owners post-commit to do as they want for handling an llvm::Error.  An
example of how this could be done is shown in the diff in
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h which had a Check() routine
already for std::error_code so I added one like it for llvm::Error .

Also there some were bugs in the existing code that did not deal with the
old ErrorOr<> return values.  So now with Expected<> since they must be
checked and the error handled, I added a TODO and a comment:
“// TODO: Actually report errors helpfully” and a call something like
consumeError(NameOrErr.takeError()) so the buggy code will not crash
since needed to deal with the Error.

Note there fixes needed to lld that goes along with this that I will commit right after this.
So expect lld not to built after this commit and before the next one.

llvm-svn: 266919
2016-04-20 21:24:34 +00:00
..
Analysis Port DemandedBits to the new pass manager. 2016-04-18 23:55:01 +00:00
Assembler [AArch64] [ARM] Make a target-independent llvm.thread.pointer intrinsic. 2016-04-19 20:51:05 +00:00
Bindings [OCaml] Expose the LLVM diagnostic handler 2016-04-10 13:55:53 +00:00
Bitcode BitcodeWriter: Break recursion when enumerating Metadata, almost NFC 2016-04-19 03:46:51 +00:00
BugPoint [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
CodeGen [lanai] Add subword scheduling itineraries. 2016-04-20 18:28:55 +00:00
DebugInfo [LLVM] Remove unwanted --check-prefix=CHECK from unit tests. NFC. 2016-04-19 23:51:52 +00:00
Examples
ExecutionEngine Disable the new Orc lazy JIT tests on Windows, they do not pass 2016-02-10 18:46:42 +00:00
Feature [NVVM] Remove noduplicate attribute from synchronizing intrinsics. 2016-03-22 22:08:01 +00:00
FileCheck Reapply r262092: [FileCheck] Abort if -NOT is combined with another suffix. 2016-02-29 22:13:03 +00:00
Instrumentation Rename asan-check-lifetime into asan-stack-use-after-scope 2016-04-20 20:02:58 +00:00
Integer
JitListener [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
LTO Refactor the InternalizePass into a helper class, and expose it through a public free function (NFC) 2016-04-13 05:25:08 +00:00
LibDriver LibDriver: Silently do nothing when provided no inputs. 2016-04-13 19:36:04 +00:00
Linker ThinLTO: never promote as external weak 2016-04-20 04:18:11 +00:00
MC [Hexagon] Fix handling of lcomm directive 2016-04-20 15:54:13 +00:00
Object Thread Expected<...> up from libObject’s getName() for symbols to allow llvm-objdump to produce a good error message. 2016-04-20 21:24:34 +00:00
Other [CG] Add a new pass manager printer pass for the old call graph and 2016-03-10 11:24:11 +00:00
SymbolRewriter
TableGen Introduce a "patchable-function" function attribute 2016-04-19 05:24:47 +00:00
ThinLTO/X86 FunctionImport: make sure we always select the right callee in presence of alias 2016-04-20 04:17:36 +00:00
Transforms [ThinLTO] Prevent importing of "llvm.used" values 2016-04-20 14:39:45 +00:00
Unit Replace hardcoded comment at 'lit.site.cfg.in' 2016-04-16 06:47:41 +00:00
Verifier [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
YAMLParser
tools Re-enable "[gold-plugin] Disable name for values other than GlobalValue" 2016-04-20 15:16:57 +00:00
.clang-format
CMakeLists.txt Moving llvm-test-depends and test-depends into the Tests folder; NFC, this simply cleans up the generated solution so that these targets don't live in the root folder of the IDE. 2016-04-12 15:09:14 +00:00
TestRunner.sh
lit.cfg test: Always treat .mir files as tests even outside of CodeGen/MIR 2016-04-04 21:23:44 +00:00
lit.site.cfg.in Replace hardcoded comment at 'lit.site.cfg.in' 2016-04-16 06:47:41 +00:00