Rafael Espindola
c32818ac9b
Update for llvm api change.
...
llvm-svn: 200863
2014-02-05 18:00:26 +00:00
Rafael Espindola
d51906e5b3
Update for llvm api change.
...
llvm-svn: 200136
2014-01-26 06:39:14 +00:00
Bob Wilson
a1b4206a70
Fix up fallout from r187156.
...
The previous change caused the driver to translate -Wa,-L to the
-msave-temp-labels option for cc1as, but cc1as did not accept that option.
This patch follows the same approach used for similar options (-relax-all,
-noexecstack) in the previous patch.
llvm-svn: 191458
2013-09-26 21:00:51 +00:00
Joey Gouly
92dfcfa403
Fix the MCTargetAsmParser API change.
...
llvm-svn: 190601
2013-09-12 10:59:24 +00:00
Bill Wendling
5257538df9
Update to the new API interface which requires the MCRegisterInfo object. <rdar://problem/13623355>
...
llvm-svn: 190291
2013-09-09 02:37:56 +00:00
David Blaikie
9260ed6c06
Don't forward all assembler arguments untouched to -cc1as
...
Use the same filtering for assembly arguments to -cc1as as we do for
-cc1, this allows a consistent (& more useful) diagnostic experience for
users (rather than getting an error from -cc1as (which a user shouldn't
really be thinking about) about --foo, they get an error from clang
about --foo in -Wa,)
I'm sort of surprised by the separation of -cc1as & the separate
argument handling, etc, but at least this removes a little bit of the
duplication.
llvm-svn: 187156
2013-07-25 21:19:01 +00:00
Rafael Espindola
16125fb652
Update for llvm API change.
...
llvm-svn: 186448
2013-07-16 19:44:23 +00:00
Rafael Espindola
ccc6ea6c0b
Don't use PathV1.h in cc1as_main.cpp.
...
llvm-svn: 184938
2013-06-26 12:48:34 +00:00
Bill Wendling
da1e3e737a
Update to pass in pointers intead of references.
...
llvm-svn: 184176
2013-06-18 07:22:05 +00:00
Reid Kleckner
898229ab4b
[Driver] Refactor clang driver to use LLVM's Option library
...
The big changes are:
- Deleting Driver/(Arg|Opt)*
- Rewriting includes to llvm/Option/ and re-sorting
- 'using namespace llvm::opt' in clang::driver
- Fixing the autoconf build by adding option everywhere
As discussed in the review, this change includes using directives in
header files. I'll make follow up changes to remove those in favor of
name specifiers.
Reviewers: espindola
Differential Revision: http://llvm-reviews.chandlerc.com/D975
llvm-svn: 183989
2013-06-14 17:17:23 +00:00
Rafael Espindola
dcf73d2275
Don't depend on the transitive inclusion of PathV1.h.
...
llvm-svn: 183945
2013-06-13 21:09:29 +00:00
Rafael Espindola
18556de316
Use the sys::RemoveFileOnSignal that takes a StringRef.
...
llvm-svn: 183944
2013-06-13 21:02:40 +00:00
Rafael Espindola
77056237d7
Update for LLVM interface change in r181680.
...
llvm-svn: 181681
2013-05-13 01:24:18 +00:00
Chad Rosier
05c71aa745
Update the error handing static functions for r178161.
...
Part of rdar://13296693
llvm-svn: 178162
2013-03-27 18:28:23 +00:00
Kevin Enderby
ae2ec4745f
We want the dwarf AT_producer for assembly source files to match clang's
...
AT_producer. Which includes clang's version information so we can tell
which version of the compiler was used.
This is second of the two steps to allow us to do this. The first was a
change to llvm-mc with revision 172630 to provide a method to set the
AT_producer string. This second step has the clang driver passing the value
of getClangFullVersion() via the new flag -dwarf-debug-producer when invoking
the integrated assembler on assembly source files. Then using the new
setDwarfDebugProducer() method to set the AT_producer string.
rdar://12888242
llvm-svn: 172758
2013-01-17 21:38:06 +00:00
Chandler Carruth
ffd5551bc7
Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate to
...
reflect the migration in r171366.
Re-sort the #include lines to reflect the new paths.
llvm-svn: 171369
2013-01-02 11:45:17 +00:00
Eric Christopher
45f2e71571
Add support for passing the main file name down to the assembler
...
for location information.
Part of PR14624
llvm-svn: 170391
2012-12-18 00:31:10 +00:00
Chandler Carruth
4d5e1a9b34
Fix PR14625 by teaching the driver to detect PWD for assembly files.
...
This also requires adding support to -cc1as for passing the detecting
PWD down through LLVM's debug info (which in turn required the LLVM
change in r170371).
The test case is weak (we only test the driver behavior) because there
is currently to infrastructure for running cc1as in the test suite. So
those four lines are untested (much like all other lines in that file),
but we have a test for the same pattern using llvm-mc in the LLVM
repository.
llvm-svn: 170373
2012-12-17 21:40:04 +00:00
Chandler Carruth
cc0694c8a4
Sort #include lines for tools/...
...
Completely automated with sort_includes.py
llvm-svn: 169240
2012-12-04 09:25:21 +00:00
Richard Smith
bd55daf2ee
Remove first argument from Arg::getValue; it's been unused since r105760.
...
llvm-svn: 167211
2012-11-01 04:30:05 +00:00
Douglas Gregor
811db4eac4
Make DiagnosticOptions intrusively reference-counted, and make sure
...
the various stakeholders bump up the reference count. In particular,
the diagnostics engine now keeps the DiagnosticOptions object alive.
llvm-svn: 166508
2012-10-23 22:26:28 +00:00
Micah Villmow
dd31ca10ef
Move TargetData to DataLayout.
...
llvm-svn: 165395
2012-10-08 16:25:52 +00:00
Roman Divacky
5bebfb7363
Follow up on llvm r164132.
...
llvm-svn: 164133
2012-09-18 16:09:16 +00:00
Jim Grosbach
490950a928
Allow MCCodeEmitter access to the target MCRegisterInfo.
...
Add MRI to the createMCCodeEmitter() call.
llvm-svn: 156830
2012-05-15 17:36:07 +00:00
Bill Wendling
f4ec97d9b0
Fix build by passing in the needed variable after r153860.
...
llvm-svn: 153861
2012-04-02 06:17:37 +00:00
Jim Grosbach
6c258a891f
Add MCRegisterInfo to the MCInstPrinter factory function interface.
...
llvm-svn: 152046
2012-03-05 19:33:41 +00:00
Dylan Noblesmith
c95d81924d
Basic: import IntrusiveRefCntPtr<> into clang namespace
...
The class name is long enough without the llvm:: added.
Also bring in RefCountedBase and RefCountedBaseVPTR.
llvm-svn: 150958
2012-02-20 14:00:23 +00:00
Dylan Noblesmith
1cd1069b68
drop more llvm:: prefixes on OwningPtr<>
...
More cleanup after r149798.
llvm-svn: 150379
2012-02-13 12:32:21 +00:00
Jim Grosbach
576452b830
Have the driver pass CPU and target feature information to cc1as.
...
When creating the MCSubtargetInfo, the assembler driver uses the CPU and
feature string to construct a more accurate model of what instructions
are and are not legal.
rdar://10840476
llvm-svn: 150273
2012-02-10 20:37:10 +00:00
David Blaikie
09d20eefaa
Make use of const-correct ParseCommandLineOptions
...
llvm-svn: 150000
2012-02-07 19:36:38 +00:00
Jim Grosbach
ff3789a6bb
Pass the SourceMgr to the MCContext for cc1as.
...
llvm-svn: 149608
2012-02-02 17:54:07 +00:00
Dylan Noblesmith
68207c0b26
driver: fix unused variable warning
...
from r147218.
llvm-svn: 147278
2011-12-26 19:29:47 +00:00
Dylan Noblesmith
e99b27f35e
Let CompilerInvocation initialization indicate failure
...
This fixes the FIXMEs in ParseAnalyzeArgs. (Also a
precursor to moving the analyzer into an AST plugin.)
For consistency, do the same with AssemblerInvocation.
llvm-svn: 147218
2011-12-23 03:05:38 +00:00
Kevin Enderby
292dc080e0
Last part of support for generating dwarf for assembly source files. This gets
...
the clang driver to enable this when assembling a .s file. rdar://9275556
llvm-svn: 147167
2011-12-22 19:31:58 +00:00
Sebastian Pop
8188c8a1f3
rename getHostTriple into getDefaultTargetTriple in clang
...
llvm-svn: 143503
2011-11-01 21:33:06 +00:00
Nick Lewycky
1d617acef9
Wire up support for the controlling the extended dwarf .file directive. With
...
r142300 but not this patch, clang -S may emit .s files that assemblers other
than llvm-mc can't parse.
llvm-svn: 142301
2011-10-17 23:05:52 +00:00
David Blaikie
9c902b5502
Rename Diagnostic to DiagnosticsEngine as per issue 5397
...
llvm-svn: 140478
2011-09-25 23:23:43 +00:00
James Molloy
98f3e18f25
Fix up MCInstPrinter creation to take the new SubtargetInfo parameter (see LLVM r139237)
...
llvm-svn: 139238
2011-09-07 17:25:30 +00:00
Evan Cheng
494eb062b5
Match LLVM change: TargetRegistry and TargetSelect have been moved to Support.
...
llvm-svn: 138451
2011-08-24 18:09:14 +00:00
Jim Grosbach
acb07b599c
Update createMCAsmParser() to match r137735.
...
llvm-svn: 137736
2011-08-16 18:33:55 +00:00
Evan Cheng
5a7a4ea505
Assembler really doesn't need to create TargetMachine anymore.
...
llvm-svn: 136045
2011-07-26 01:49:26 +00:00
Evan Cheng
9568f27950
Rename createCodeEmitter to createMCCodeEmitter; createObjectStreamer to createMCObjectStreamer.
...
llvm-svn: 136032
2011-07-26 00:42:40 +00:00
Evan Cheng
939f809ce9
Rename createAsmParser to createMCAsmParser.
...
llvm-svn: 136029
2011-07-26 00:24:45 +00:00
Evan Cheng
4b89983662
Rename TargetAsmBackend to MCAsmBackend; rename createAsmBackend to createMCAsmBackend.
...
llvm-svn: 136011
2011-07-25 23:25:09 +00:00
Evan Cheng
c2d8c6be92
Assembler doesn't need to initialize TargetMachine's anymore.
...
llvm-svn: 135964
2011-07-25 20:53:26 +00:00
Evan Cheng
06e70d33fc
Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where they belong.
...
llvm-svn: 135834
2011-07-23 00:45:53 +00:00
Evan Cheng
c391a58b2b
Match LLVM API change.
...
llvm-svn: 135813
2011-07-22 21:59:11 +00:00
Evan Cheng
b5517a4d8c
Match MCContext change.
...
llvm-svn: 135612
2011-07-20 19:53:19 +00:00
Evan Cheng
347033fd8b
Match LLVM API change.
...
llvm-svn: 135570
2011-07-20 06:22:27 +00:00
Evan Cheng
3f37dd065b
Match createTargetMachine API change.
...
llvm-svn: 135469
2011-07-19 06:37:41 +00:00
Evan Cheng
b505ace101
MCContext now takes MCRegisterInfo.
...
llvm-svn: 135425
2011-07-18 20:57:51 +00:00
Evan Cheng
6d188f5f1c
Match llvm API change.
...
llvm-svn: 135220
2011-07-14 23:50:56 +00:00
Evan Cheng
279f2907ed
Match createCodeEmitter change.
...
llvm-svn: 134885
2011-07-11 04:24:19 +00:00
Joerg Sonnenberger
e3531fcf88
Unbreak -cc1as mode after MC subtarget changes
...
llvm-svn: 134877
2011-07-10 19:16:25 +00:00
Evan Cheng
dec3187e7f
createAsmParser API change.
...
llvm-svn: 134797
2011-07-09 06:04:17 +00:00
Chandler Carruth
961995dc9a
Update the creation of the TargetAsmParser based on API change in r134678.
...
llvm-svn: 134680
2011-07-08 03:15:48 +00:00
Evan Cheng
299b36fa72
createMCInstPrinter doesn't need TargetMachine anymore.
...
llvm-svn: 134526
2011-07-06 19:45:57 +00:00
Evan Cheng
adc7959851
createTargetMachine now takes a CPU string.
...
llvm-svn: 134128
2011-06-30 02:06:32 +00:00
Joerg Sonnenberger
b487d2d815
Support -fatal-warnings for the assembler frontend
...
llvm-svn: 131662
2011-05-19 18:42:29 +00:00
Rafael Espindola
26cdfa71ef
Update API.
...
llvm-svn: 130588
2011-04-30 03:46:18 +00:00
Daniel Dunbar
9cf7bc7a6c
Frontend/cc1as: Add support for -L.
...
llvm-svn: 128432
2011-03-28 22:49:24 +00:00
Bill Wendling
a8da50d011
Pass in the TargetMachine parameter to the inst printer.
...
llvm-svn: 127987
2011-03-21 05:02:03 +00:00
Rafael Espindola
148141c98f
Add support for the --noexecstack option. Fixes PR8762.
...
llvm-svn: 124078
2011-01-23 17:58:26 +00:00
Michael J. Spencer
d9da7a1f16
MemoryBuffer API update.
...
llvm-svn: 121956
2010-12-16 03:28:14 +00:00
Daniel Dunbar
8f514a8826
Update for LLVM API change.
...
llvm-svn: 121950
2010-12-16 03:06:05 +00:00
Rafael Espindola
86f2c57c8d
Fixed version of 121435.
...
llvm-svn: 121472
2010-12-10 07:40:14 +00:00
Rafael Espindola
33f793892f
Revert my previous patch to make the valgrind bots happy.
...
llvm-svn: 121460
2010-12-10 04:01:05 +00:00
Rafael Espindola
40fa9b6765
Update clang for the API changes in the cfi patch.
...
llvm-svn: 121435
2010-12-09 23:48:34 +00:00
Michael J. Spencer
f25faaaffb
Use error_code instead of std::string* for MemoryBuffer.
...
llvm-svn: 121378
2010-12-09 17:36:38 +00:00
Michael J. Spencer
8aaf49959c
Merge System into Support.
...
llvm-svn: 120297
2010-11-29 18:12:39 +00:00
Argyrios Kyrtzidis
5c26cda273
getNumErrors() -> hasErrorOccurred()
...
llvm-svn: 119765
2010-11-19 00:19:18 +00:00
Argyrios Kyrtzidis
d004064864
Refactoring of Diagnostic class.
...
-Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class.
-DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units.
-The rest of the state in Diagnostic object is considered related and tied to one translation unit.
-Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a
SourceLocation instead of a FullSourceLoc.
-Reflect the changes to various interfaces.
llvm-svn: 119730
2010-11-18 20:06:41 +00:00
Rafael Espindola
85111907bb
Call InitSections when assembling. This makes clang's output match that of
...
llvm-mc.
llvm-svn: 116405
2010-10-13 14:53:57 +00:00
Duncan Sands
f610b5b622
Straighten out target triples provided on the command line
...
before using them.
llvm-svn: 112468
2010-08-30 09:42:39 +00:00
Douglas Gregor
2dd19f1d5f
Simplify the ownership model for DiagnosticClients, which was really
...
convoluted and a bit leaky. Now, the Diagnostic object owns its
DiagnosticClient.
llvm-svn: 111437
2010-08-18 22:29:43 +00:00
Dan Gohman
b37af7de47
Call llvm::remove_fatal_error_handler before deallocating objects
...
which are used by the error handling functions.
llvm-svn: 111427
2010-08-18 21:23:17 +00:00
Benjamin Kramer
4b5de0d6a3
Prepare for upcoming ownership change.
...
llvm-svn: 109766
2010-07-29 17:48:03 +00:00
Daniel Dunbar
deaff5d792
Update for LLVM API change.
...
llvm-svn: 108665
2010-07-19 00:33:53 +00:00
Daniel Dunbar
05474285aa
clang -cc1as: Switch to using AsmParser constructor function.
...
llvm-svn: 108605
2010-07-17 02:26:21 +00:00
Daniel Dunbar
a2b1f8b5cd
MC: Pass the target instance to the AsmParser constructor.
...
llvm-svn: 107427
2010-07-01 20:41:59 +00:00
Daniel Dunbar
a442fd5da6
Driver: Fix arg_iterator typing to reflect that it is really an iterator over Arg*s.
...
llvm-svn: 105838
2010-06-11 22:00:13 +00:00
Daniel Dunbar
0454f657ce
clang -cc1as: Add -help, -version, and -mllvm support.
...
Also, fix output defaulting to match llvm-mc.
llvm-svn: 104246
2010-05-20 18:15:20 +00:00
Daniel Dunbar
2fcaa549a8
Driver/MC: Add 'clang -cc1as' integrated assembler tool, currently accepts approximately the same interface as 'llvm-mc'.
...
llvm-svn: 104239
2010-05-20 17:49:16 +00:00