Sean Callanan
1a0eeb6e06
Promoted the reference to the SourceMgr from AsmLexer
...
into AsmParser, in preparation for making AsmLexer
independent of the SourceMgr
llvm-svn: 94043
2010-01-20 22:45:23 +00:00
Sean Callanan
70855e42e6
Modified MCAsmLexer to return error information upward
...
rather than printing it locally, reducing its dependence
on SourceMgr.
llvm-svn: 94041
2010-01-20 22:18:24 +00:00
Chris Lattner
38caaf14c1
give createAsmStreamer an 'isLittleEndian' argument.
...
llvm-svn: 93986
2010-01-20 06:39:07 +00:00
Sean Callanan
936b0d3144
Promoted the getTok() method to MCAsmParser so that
...
the two token accessor functions are declared consistently.
Modified the clients of MCAsmParser to reflect this change.
llvm-svn: 93916
2010-01-19 21:44:56 +00:00
Sean Callanan
686ed8d248
Added a Lex function to the AsmParser, to allow handling
...
of include directives to occur within the parser itself.
This will break the lexer's dependency on a SourceMgr as
input.
llvm-svn: 93899
2010-01-19 20:22:31 +00:00
Chris Lattner
c35681b298
Generalize mcasmstreamer data emission APIs to take an address space
...
identifier. There is no way to work around it.
llvm-svn: 93896
2010-01-19 19:46:13 +00:00
Chris Lattner
0c65fd4902
add a "MCStreamer::EmitFill" method, and move the default implementation
...
(which just iteratively emits bytes) to MCStreamer.
llvm-svn: 93888
2010-01-19 18:45:47 +00:00
Chris Lattner
ab9cd3e132
fix parsing .comm directives on systems which do not represent alignments
...
as a power of 2. This fixes MC/AsmParser/directive_comm.s
llvm-svn: 93867
2010-01-19 06:22:22 +00:00
Eli Friedman
eb0c52f194
Make opt -O3 act more like clang -O3 etc., by making the inlining thresholds
...
match.
llvm-svn: 93798
2010-01-18 22:38:31 +00:00
Chris Lattner
6b4f73ea94
make llvm-config more portable to windows versions of perl,
...
patch by Michael Beck!
llvm-svn: 93793
2010-01-18 22:27:43 +00:00
Chris Lattner
b4ffc894e6
now that mangler is in libtarget, it can use MCAsmInfo instead of clients
...
having to pass various fields from it in. Simplify.
llvm-svn: 93686
2010-01-17 18:22:35 +00:00
Dan Gohman
915ad96b40
Don't create a (empty) output file, and don't warn about bitcode output
...
to a console, when --analyze is used.
Similarly, avoid creating an empty output file when --disable-output is used.
Print a warning when the -o option appears with either --analyze or
--disable-output, to indicate that the option is being ignored.
llvm-svn: 93685
2010-01-17 17:47:24 +00:00
Chris Lattner
f62e3ee8c5
move the mangler into libtarget from vmcore.
...
llvm-svn: 93664
2010-01-16 21:57:06 +00:00
Chris Lattner
6a941f0b85
remove obsolete comment.
...
llvm-svn: 93661
2010-01-16 21:34:51 +00:00
Chris Lattner
dc2cb5afad
bugpoint doesn't need the mangler at all. DisambiguateGlobalSymbols
...
dates to a time when two different LLVM values could have the same
name but different types. Simplify it to just assign names to unnamed
things and let the core symtab resolve duplicates.
llvm-svn: 93660
2010-01-16 21:34:01 +00:00
Chris Lattner
2ce863be1c
remove calls to dead methods.
...
llvm-svn: 93657
2010-01-16 21:20:34 +00:00
Chris Lattner
46d3a102da
remove use of getMangledName.
...
llvm-svn: 93655
2010-01-16 20:56:05 +00:00
Chris Lattner
9787fd0468
switch liblto to use the new getNameWithPrefix() method instead of getMangledName.
...
llvm-svn: 93643
2010-01-16 18:12:14 +00:00
Chris Lattner
e17df0b7f0
fix a bug in range information for $42, eliminate an
...
unneeded argument from ParseExpression.
llvm-svn: 93536
2010-01-15 19:39:23 +00:00
Chris Lattner
528d00b913
extend MCAsmParser::ParseExpression and ParseParenExpression
...
to return range information for subexpressions. Use this to
provide range info for several new X86Operands.
llvm-svn: 93534
2010-01-15 19:28:38 +00:00
Nate Begeman
d232150b83
Hook up llc's -filetype=obj to use MCStreamer if an MCCodeEmitter is available.
...
Remove most of old Mach-O Writer support, it has been replaced by MCMachOStreamer
Further refactoring to completely remove MachOWriter and drive the object file
writer with the AsmPrinter MCInst/MCSection logic is forthcoming.
llvm-svn: 93527
2010-01-15 18:51:18 +00:00
Chris Lattner
14bf521792
add virtual methods to get the start/end of a MCParsedAsmOperand,
...
the default implementation returns "unknown".
llvm-svn: 93470
2010-01-14 22:29:57 +00:00
Chris Lattner
f29c0b6880
Split the TargetAsmParser "ParseInstruction" interface in half:
...
the new ParseInstruction method just parses and returns a list of
target operands. A new MatchInstruction interface is used to
turn the operand list into an MCInst.
This requires new/deleting all the operands, but it also gives
targets the ability to use polymorphic operands if they want to.
llvm-svn: 93469
2010-01-14 22:21:20 +00:00
Chris Lattner
77fd677111
prune #includes in TargetAsmParser.h
...
Pass in SMLoc of instr opcode into ParseInstruction.
Make AsmToken be a class, not a struct.
llvm-svn: 93457
2010-01-14 21:32:45 +00:00
Benjamin Kramer
c6fe3c3273
Reimplement getToken and SplitString as "StringRef helper functions"
...
- getToken is modeled after StringRef::split but it can split on multiple
separator chars and skips leading seperators.
- SplitString is a StringRef::split variant for more than 2 elements with the
same behaviour as getToken.
llvm-svn: 93161
2010-01-11 18:03:24 +00:00
David Greene
ed8a1def24
Enable debug buffering.
...
llvm-svn: 92667
2010-01-05 01:30:32 +00:00
David Greene
6e55be681e
Enable debug buffering.
...
llvm-svn: 92666
2010-01-05 01:30:21 +00:00
Mikhail Glushenkov
65f12ea72e
Forward -O0 to llvm-gcc.
...
llvm-svn: 92414
2010-01-02 08:27:23 +00:00
Mikhail Glushenkov
8181d150c0
Apparently, it is OK for -MT to be specified several times.
...
llvm-svn: 92413
2010-01-02 08:27:10 +00:00
Mikhail Glushenkov
8a52b77523
Minor simplifactions.
...
llvm-svn: 92393
2010-01-01 04:41:10 +00:00
Mikhail Glushenkov
8711c8dbcf
Minor simplifications.
...
llvm-svn: 92390
2010-01-01 03:50:51 +00:00
Bill Wendling
ae606a1d1d
Mark some debug variables as 'unused' to quiet compiler and analyzer.
...
llvm-svn: 92183
2009-12-28 01:34:57 +00:00
Douglas Gregor
66ffa50e6d
Fix another -Wmismatched-tags warning
...
llvm-svn: 92017
2009-12-23 18:27:13 +00:00
Douglas Gregor
35ac67ff8e
Fix struct/class mismatch for LTOModule and LTOCodeGenerator, detected by Clang
...
llvm-svn: 92004
2009-12-23 17:05:07 +00:00
Mikhail Glushenkov
0cb2a55c76
Make it easier to regenerate docs when srcdir != objdir.
...
llvm-svn: 92000
2009-12-23 12:50:03 +00:00
Mikhail Glushenkov
f48a0c43b6
Allow (set_option SwitchOption, true).
...
llvm-svn: 91997
2009-12-23 12:49:30 +00:00
Chris Lattner
b257d24f62
rename HexDisassembler -> Disassembler, it works on any input
...
integer encoding (0123, 0b10101, 42, etc).
llvm-svn: 91934
2009-12-22 22:50:29 +00:00
Chris Lattner
e3437b33f5
just discard the debug output from the disassembler.
...
llvm-svn: 91933
2009-12-22 22:47:43 +00:00
Chris Lattner
778f92ab02
specify what is invalid about it
...
llvm-svn: 91901
2009-12-22 07:03:21 +00:00
Chris Lattner
502f0f11e0
reject invalid input with a caret, e.g.:
...
simple-tests.txt:16:1: error: invalid instruction
0xff 0xff
^
llvm-svn: 91898
2009-12-22 06:58:29 +00:00
Chris Lattner
dd0c01b5de
various cleanups, make the disassemble reject lines with too much
...
data on them, for example:
addb %al, (%rax)
simple-tests.txt:11:5: error: excess data detected in input
0 0 0 0 0
^
llvm-svn: 91896
2009-12-22 06:56:51 +00:00
Chris Lattner
8879918722
If you thought that it didn't make sense for the disassembler
...
to not produce caret diagnostics, you were right!
llvm-svn: 91895
2009-12-22 06:45:48 +00:00
Chris Lattner
dc9845b79a
rewrite the file parser for the disassembler, implementing support for
...
comments. Also, check in a simple testcase for the disassembler,
including a test for r91864
llvm-svn: 91894
2009-12-22 06:37:58 +00:00
Chris Lattner
72cbaa2ecb
don't crash on blank lines, rename some variables.
...
llvm-svn: 91892
2009-12-22 06:24:00 +00:00
Sanjiv Gupta
bdef02be69
Adding a bunch of options to the mcc16 driver.
...
llvm-svn: 91776
2009-12-19 13:13:29 +00:00
Mikhail Glushenkov
1fe2678a06
Add a 'set_option' action for use in OptionPreprocessor.
...
llvm-svn: 91594
2009-12-17 07:49:16 +00:00
Chandler Carruth
187220e3f5
Update CMake build to include HexDisassembler.cpp.
...
llvm-svn: 91589
2009-12-17 06:35:17 +00:00
Sean Callanan
7e64550747
Test harness for the LLVM disassembler. When invoked
...
with -disassemble, llvm-mc now accepts lines of the
form
0x00 0x00
and passes the resulting bytes to the disassembler for
the chosen (or default) target, printing the result.
llvm-svn: 91579
2009-12-17 01:49:59 +00:00
Mikhail Glushenkov
096fc103fb
Validate the generated C++ code in llvmc tests.
...
Checks that the code generated by 'tblgen --emit-llvmc' can be actually
compiled. Also fixes two bugs found in this way:
- forward_transformed_value didn't work with non-list arguments
- cl::ZeroOrOne is now called cl::Optional
llvm-svn: 91404
2009-12-15 03:04:52 +00:00
Mikhail Glushenkov
53ec77972e
Small documentation update.
...
llvm-svn: 91401
2009-12-15 03:03:37 +00:00