[llvm-commits] [llvm] r78547 - in /llvm/trunk: include/llvm/MC/ include/llvm/Target/ lib/MC/ lib/Target/ lib/Target/ARM/AsmPrinter/ lib/Target/PowerPC/AsmPrinter/ lib/Target/X86/AsmPrinter/ test/CodeGen/ARM/ test/CodeGen/PowerPC/ test/CodeGen/X86

Daniel Dunbar daniel at zuster.org
Sun Aug 9 20:43:02 PDT 2009


Very nice!

On Sun, Aug 9, 2009 at 6:39 PM, Chris Lattner<sabre at nondot.org> wrote:
> Author: lattner
> Date: Sun Aug  9 20:39:42 2009
> New Revision: 78547
>
> URL: http://llvm.org/viewvc/llvm-project?rev=78547&view=rev
> Log:
> Make the big switch: Change MCSectionMachO to represent a section *semantically*
> instead of syntactically as a string.  This means that it keeps track of the
> segment, section, flags, etc directly and asmprints them in the right format.
> This also includes parsing and validation support for llvm-mc and
> "attribute(section)", so we should now start getting errors about invalid
> section attributes from the compiler instead of the assembler on darwin.

I couldn't help but wire this up:

--
ddunbar at giles:Frontend$ clang -c backend-errors.c
fatal error: error in backend: Global variable 'a' has an invalid
section specifier
      'I AM, not, legal': mach-o section specifier uses an unknown section type.
--
compare to:
--
ddunbar at giles:Frontend$ gcc -c backend-errors.c
/var/folders/DQ/DQ8GT3++HESEzT1obWBynE+++TI/-Tmp-//cc45w2pq.s:2:Expected
comma after segment-name
/var/folders/DQ/DQ8GT3++HESEzT1obWBynE+++TI/-Tmp-//cc45w2pq.s:2:Rest
of line ignored. 1st junk character valued 77 (M).
--

Hmm, I'm not sure which one is easier to read!

 - Daniel




More information about the llvm-commits mailing list