Commit Graph

28 Commits

Author SHA1 Message Date
Chandler Carruth
1b279144ec [cleanup] Re-sort all the #include lines in LLVM using
utils/sort_includes.py.

I clearly haven't done this in a while, so more changed than usual. This
even uncovered a missing include from the InstrProf library that I've
added. No functionality changed here, just mechanical cleanup of the
include order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225974 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-14 11:23:27 +00:00
Colin LeMahieu
04871e9c9b Cleaning out google tests from MC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222770 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-25 18:03:08 +00:00
Benjamin Kramer
f04ce0e657 Dispose disassembler after use in unit test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222083 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-15 10:53:12 +00:00
Rafael Espindola
bb11e56168 Fix the other build system.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221901 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-13 17:12:19 +00:00
Rafael Espindola
961f1bb09e Fix a regression on the disassembling C API.
The fix is easy. Unfortunately, we had 0 tests, so adding one was somewhat
complicated.

Thanks to Kevin Enderby for the report.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221899 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-13 16:52:07 +00:00
Colin LeMahieu
38d3e4d5d8 [Hexagon] Reverting 220584 to address ASAN errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221210 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 00:14:36 +00:00
Colin LeMahieu
8699f5390b [Hexagon] Resubmission of 220427
Modified library structure to deal with circular dependency between HexagonInstPrinter and HexagonMCInst.
Adding encoding bits for add opcode.
Adding llvm-mc tests.
Removing unit tests.

http://reviews.llvm.org/D5624

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220584 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-24 19:00:32 +00:00
NAKAMURA Takumi
f3379e7bdd [CMake] Prune trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220479 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 11:31:33 +00:00
NAKAMURA Takumi
effe629b3d Revert r220427, "[Hexagon] Adding encoding bits for add opcode."
It brought cyclic dependecy between HexagonAsmPrinter and HexagonDesc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220478 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 11:31:22 +00:00
Colin LeMahieu
545127f54d [Hexagon] Adding encoding bits for add opcode.
Adding llvm-mc tests.
Removing unit tests.

http://reviews.llvm.org/D5624

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220427 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 20:58:35 +00:00
NAKAMURA Takumi
4462f60d57 [CMake] HexagonTests: Update LINK_COMPONENTS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219072 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-05 04:54:41 +00:00
Sid Manning
4cd443ac18 Add unit tests to verify Hexagon emission.
Add the test cases I overlooked, part of the original commit,
http://reviews.llvm.org/D5523

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219016 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-03 20:33:03 +00:00
Sid Manning
30d67d99cf Adding skeleton for unit testing Hexagon Code Emission
Adding and modifying CMakeLists.txt files to run unit tests under
unittests/Target/* if the directory exists.  Adding basic unit test to check
that code emitter object can be retrieved.

Differential Revision: http://reviews.llvm.org/D5523
Change by: Colin LeMahieu

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218986 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-03 13:18:11 +00:00
Hans Wennborg
4edcbaec90 WinCOFFObjectWriter: optimize the string table for common suffices
This is a follow-up from r207670 which did the same for ELF.

Differential Revision: http://reviews.llvm.org/D5530

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218636 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-29 22:43:20 +00:00
Sean Silva
73d86aa56a Nuke MCAnalysis.
The code is buggy and barely tested. It is also mostly boilerplate.
(This includes MCObjectDisassembler, which is the interface to that
functionality)

Following an IRC discussion with Jim Grosbach, it seems sensible to just
nuke the whole lot of functionality, and dig it up from VCS if
necessary (I hope not!).

All of this stuff appears to have been added in a huge patch dump (look
at the timeframe surrounding e.g. r182628) where almost every patch
seemed to be untested and not reviewed before being committed.
Post-review responses to the patches were never addressed. I don't think
any of it would have passed pre-commit review.

I doubt anyone is depending on this, since this code appears to be
extremely buggy. In limited testing that Michael Spencer and I did, we
couldn't find a single real-world object file that wouldn't crash the
CFG reconstruction stuff. The symbolizer stuff has O(n^2) behavior and
so is not much use to anyone anyway. It seemed simpler to remove them as
a whole. Most of this code is boilerplate, which is the only way it was
able to scrape by 60% coverage.

HEADSUP: Modules folks, some files I nuked were referenced from
include/llvm/module.modulemap; I just deleted the references. Hopefully
that is the right fix (one was a FIXME though!).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216983 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 22:32:20 +00:00
NAKAMURA Takumi
a84c1fb652 [CMake] Update libdeps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212920 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-14 05:01:53 +00:00
Rafael Espindola
7413fefb8b Invert the MC -> Object dependency.
Now that we have a lib/MC/MCAnalysis, the dependency was there just because
of two helper classes. Move the two over to MC.

This will allow IRObjectFile to parse inline assembly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212248 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-03 02:01:39 +00:00
Rafael Espindola
cca08872b0 Move CFG building code to a new lib/MC/MCAnalysis library.
The new library is 150KB on a Release+Asserts build, so it is quiet a bit of
code that regular users of MC don't need to link with now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212209 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-02 19:49:34 +00:00
Rafael Espindola
49978e6125 Fix MCDataAtom never calling remap when adding data.
This patch fixes a small mistake in MCDataAtom::addData() where it doesn't ever
call remap():

-  if (Data.size() > Begin - End - 1)
+  if (Data.size() > End + 1 - Begin)
     remap(Begin, End + 1);

This is currently not visible because of another bug is the disassembler, so
the patch includes a unit test.

Patch by Stephen Checkoway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192823 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-16 18:26:16 +00:00
Benjamin Kramer
d6f034b2d0 Remove now empty unit test directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77790 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01 19:07:29 +00:00
Chris Lattner
fbad2cc949 daniel says it's fine to nuke this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77789 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01 18:38:21 +00:00
Chris Lattner
27a32604cc update for new api
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77788 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01 18:35:49 +00:00
Benjamin Kramer
66e7a97999 Adjust unit test for the MCSection changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77714 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 19:12:33 +00:00
Daniel Dunbar
44b8472add Fix order of arguments to EXPECT_EQ
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74441 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 19:57:24 +00:00
Daniel Dunbar
84a2926fb7 Sketch streamer support for .align, .org functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74109 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 19:25:34 +00:00
Daniel Dunbar
71d259bc4b We decided to not worry about Atoms for now, it should be straightforward to
reintroduce them later.

Also, don't require MCSection* when creating a symbol.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74081 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 17:00:42 +00:00
Daniel Dunbar
f5e75a1fa9 MCStreamer: Test printing values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74076 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 16:05:35 +00:00
Daniel Dunbar
a11af531ec Start MCAsmStreamer implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74044 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 01:03:06 +00:00