correct target directive handling error handling
authorSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 13 Jan 2014 01:15:39 +0000 (01:15 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 13 Jan 2014 01:15:39 +0000 (01:15 +0000)
commitb6e0946d407acf62a3f55ae22ce578d5af3bc5cc
treed1049c0286388cbba38953a7352d65378f9c128d
parent2d81106fa01e77996a29704a3d3c31856ddbab70
correct target directive handling error handling

The target specific parser should return `false' if the target AsmParser handles
the directive, and `true' if the generic parser should handle the directive.
Many of the target specific directive handlers would `return Error' which does
not follow these semantics.  This change simply changes the target specific
routines to conform to the semantis of the ParseDirective correctly.

Conformance to the semantics improves diagnostics emitted for the invalid
directives.  X86 is taken as a sample to ensure that multiple diagnostics are
not presented for a single error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199068 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
lib/Target/Mips/AsmParser/MipsAsmParser.cpp
lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
lib/Target/X86/AsmParser/X86AsmParser.cpp
test/MC/X86/x86-target-directives.s [new file with mode: 0644]