This is an archive of the discontinued LLVM Phabricator instance.

[mips] Splitting up class definition from implementation.
ClosedPublic

Authored by matheusalmeida on Mar 10 2014, 8:39 AM.

Details

Summary

[mips] Splitting up class definition from implementation so that we can specialise MipsMCCodeEmitter with some information regarding register usage. That information will then be used by the target ELF streamer (including MipsMCCodeEmitter.h added by this patch) to produce .reginfo and .Mips.options ELF sections.

No functional changes.

This is an attempt to fix Bug 798 - Create .reginfo/.MIPS_options section.

Diff Detail

Event Timeline

jacksprat accepted this revision.Mar 10 2014, 9:13 AM

You are not going to get any complaints from me for splitting declarations from implementation.
I'm assuming the files were clang-formatted. If not, they should be.

LGTM

A few minor comments.

lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.h
16

This shouldn't be in a header since it may conflict with other definitions of DEBUG_TYPE.
Also there's no #ifndef guard.

17–30

I suspect some of these headers aren't required. For example, it looks like 'class MCContext' will suffice.

57–72

This should probably still be in the .cpp since it's non-trivial

matheusalmeida updated this revision to Unknown Object (????).Mar 11 2014, 4:48 AM
  • [mips] Using forward declarations to reduce the number of \#includes in header file.

    Moved non-trivial functions and DEBUG_TYPE to .cpp file.

    Added guards.
dsanders accepted this revision.Mar 11 2014, 6:58 AM

LGTM after clang-formatting the patch.

matheusalmeida updated this revision to Unknown Object (????).Mar 11 2014, 7:24 AM
  • [mips] Fix generation of .reginfo and .Mips.options. We now determine the register

Please ignore this. I created a new branch but for some reason it didn't create a new revision...

Committed in r204320.