llvm/test/MC/MachO
Kevin Enderby 29c96f133e Fix the assembler to print a better relocatable expression error
diagnostic that includes location information.

Currently if one has this assembly:

	.quad (0x1234 + (4 * SOME_VALUE))

where SOME_VALUE is undefined ones gets the less than
useful error message with no location information:

% clang -c x.s
clang -cc1as: fatal error: error in backend: expected relocatable expression

With this fix one now gets a more useful error message
with location information:

% clang -c x.s 
x.s:5:8: error: expected relocatable expression
 .quad (0x1234 + (4 * SOME_VALUE))
       ^

To do this I plumbed the SMLoc through the MCObjectStreamer
EmitValue() and EmitValueImpl() interfaces so it could be used
when creating the MCFixup.

rdar://12391022


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206906 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-22 17:27:29 +00:00
..
ARM ARM: consolidate MachO checks for ARM asm parser 2014-04-05 22:09:51 +00:00
ARM64 ARM64: initial backend import 2014-03-29 10:18:08 +00:00
absolute.s Assembler: Darwin variables defined via .set are no-dead-strip. 2012-09-13 23:11:31 +00:00
absolutize.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
bad-darwin-x86_64-32-bit-abs-addr.s The darwin integrated assembler for X86 in 64-bit mode is not rejecting 2013-08-29 00:19:03 +00:00
bad-darwin-x86_64-diff-relocs.s Fix a crash with X86 Mach-O and a subtraction expression where both symbols are 2013-08-12 22:45:44 +00:00
bad-darwin-x86_64-reloc-expr.s Fix the assembler to print a better relocatable expression error 2014-04-22 17:27:29 +00:00
bad-dollar.s Have the integrated assembler give an error if $1 is used as an identifier in 2013-01-22 21:09:20 +00:00
bad-indirect-symbols.s The integrated darwin assembler can hang in an infinite loop (or get an assert 2013-08-28 17:50:59 +00:00
bad-macro.s Add a warning when there is a macro defintion that has named parameters but 2013-01-22 21:44:53 +00:00
bss.s Fix known typos 2014-01-24 17:20:08 +00:00
comm-1.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
darwin-complex-difference.s MC/Expr: Implemnt more aggressive folding during symbol evaluation using 2010-12-17 05:50:33 +00:00
darwin-x86_64-diff-reloc-assign-2.s Fixed a crash in the integrated assembler for Mach-O when a symbol difference 2013-09-05 20:25:06 +00:00
darwin-x86_64-diff-reloc-assign.s Fixed a crash in llvm-mc for Mach-O when a symbol difference expression uses a 2012-01-31 23:02:57 +00:00
darwin-x86_64-diff-relocs.s Fix a ton of comment typos found by codespell. Patch by 2011-04-15 05:18:47 +00:00
darwin-x86_64-nobase-relocs.s Fix a Darwin x86_64 special case of a jmp to a temporary symbol from an atom 2011-09-08 20:53:44 +00:00
darwin-x86_64-reloc-offsets.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
darwin-x86_64-reloc.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
data.s
debug_frame.s [MC] Emit an error if cfi_startproc is used before a symbol is defined. 2014-04-15 01:17:45 +00:00
diff-with-two-sections.s Fix absolute recording of differences of symbols in two sections. Reduced from ctor_dtor_count-2.cpp. 2010-12-07 17:12:32 +00:00
direction_labels.s Revert r15266. This fixes llvm.org/pr15266. 2013-02-14 16:23:08 +00:00
eh_symbol.s Convert CodeGen test into a more specific MC test. 2014-03-20 22:05:59 +00:00
eh-frame-reloc.s Convert another CodeGen test into a MC test. 2014-03-20 23:35:00 +00:00
eh-symbols.s Move codegen test over to MC. 2014-03-21 17:55:34 +00:00
empty-dwarf-lines.s Second try at making direct object emission produce the same results 2010-12-06 17:27:56 +00:00
file.s Fixed a bug in the code to create a dwarf file and directory table entires when 2011-11-01 23:39:05 +00:00
gen-dwarf-cpp.s llvm/test/MC/MachO/gen-dwarf-cpp.s: Relax an expression to match DOS pat. 2014-03-17 05:31:54 +00:00
gen-dwarf-macro-cpp.s Now that llvm-dwarfdump supports flags to specify which DWARF section to dump, 2013-01-25 21:44:53 +00:00
gen-dwarf-producer.s Now that llvm-dwarfdump supports flags to specify which DWARF section to dump, 2013-01-25 21:44:53 +00:00
gen-dwarf.s Support DWARF discriminators in object streamer. 2014-02-14 19:27:53 +00:00
i386-large-relocations.s X86_32: Large Symbol+Offset relocations. 2012-09-26 21:27:45 +00:00
indirect-symbols.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
jcc.s Change section_data dumping to print hex numbers instead of using 2010-09-11 15:25:58 +00:00
lcomm-attributes.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
linker-option-1.s [MC/Mach-O] Add AsmParser support for .linker_option directive. 2013-01-18 01:25:48 +00:00
linker-option-2.s [MC/Mach-O] Add support for linker options in Mach-O files. 2013-01-18 01:26:07 +00:00
linker-options.ll [MC/Mach-O] Load commands are supposed to 8-byte aligned on 64-bit. 2013-01-22 03:42:49 +00:00
lit.local.cfg [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
loc.s Add reduced test from 8845. 2010-12-22 21:15:13 +00:00
osx-version-min-load-command.s Darwin: Add assembler directives to create version-min load commands. 2014-03-18 22:09:05 +00:00
pcrel-to-other-section.s Fix pcrel relocations that cross sections. 2010-12-07 03:50:14 +00:00
previous.s Add .pushsection', .popsection', and `.previous' directives to Darwin ASM. 2012-08-08 06:30:30 +00:00
pushsection.s Add .pushsection', .popsection', and `.previous' directives to Darwin ASM. 2012-08-08 06:30:30 +00:00
relax-jumps.s Change section_data dumping to print hex numbers instead of using 2010-09-11 15:25:58 +00:00
relax-recompute-align.s Relax alignment fragments. 2010-12-15 08:45:53 +00:00
reloc-diff.s
reloc-pcrel-offset.s MC tweak symbol difference resolution for non-local symbols. 2012-01-17 22:14:39 +00:00
reloc-pcrel.s MC tweak symbol difference resolution for non-local symbols. 2012-01-17 22:14:39 +00:00
reloc.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
section-align-1.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
section-align-2.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
section-attributes.s MC/Mach-O: Fix regression introduced in r126127, this assignment shouldn't have 2011-03-17 16:25:24 +00:00
section-flags.s
string-table.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
symbol-diff.s Fix a crash reduced from gcc produced assembly. 2010-12-07 01:09:54 +00:00
symbol-flags.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
symbol-indirect.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
symbols-1.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
tbss.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
tdata.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
temp-labels.s MC: Add support for disabling "temporary label" behavior. Useful for debugging 2011-03-28 22:49:15 +00:00
thread_init_func.s Change section_data dumping to print hex numbers instead of using 2010-09-11 15:25:58 +00:00
tls.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
tlv-bss.ll Using the integrated assembler we'd fail to change section to the 2013-08-07 21:13:06 +00:00
tlv-reloc.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
tlv.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
values.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
variable-errors.s MCAsmLayout: Add support for computing the symbol offset of variables. Not 2011-04-29 18:20:20 +00:00
variable-exprs.s MC: Change variable symbols to be recognized as defined, by assigning their sections based on FindAssociatedSection(). 2011-04-29 18:20:17 +00:00
weakdef.s Fix relocations with weak definitions. 2010-12-07 05:57:28 +00:00
x86_32-optimal_nop.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
x86_32-scattered-reloc-fallback.s Fix a bug in darwin's 32-bit X86 handling of evaluating fixups. 2013-12-04 23:36:24 +00:00
x86_32-sections.s
x86_32-symbols.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
x86_64-reloc-arithmetic.s MachOWriter: Don't crash on fixups with arithmetic, emit a relocation instead. This matches what as does. 2011-08-12 01:51:29 +00:00
x86_64-sections.s
x86_64-symbols.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
x86-data-in-code.ll MachO: direct-to-object attribute for data-in-code markers. 2012-10-01 22:20:54 +00:00
zerofill-1.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
zerofill-2.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
zerofill-3.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
zerofill-4.s
zerofill-5.s macho-dump: Fix typo. 2010-11-27 04:00:06 +00:00
zerofill-sect-align.s