Commit Graph

113717 Commits

Author SHA1 Message Date
Chandler Carruth c0fe585e0c Extract the actual printing of the message string into a helper
function. Doing this conveniently requires moving the word wrapping to
use a StringRef which seems generally an improvement. There is a lot
that could be simplified in the word wrapping by using StringRef that
I haven't looked at yet...

llvm-svn: 140524
2011-09-26 11:19:35 +00:00
Chandler Carruth bae3c7c833 Group the helpers for word wrapping with the primary routine. No
functionality changed.

llvm-svn: 140523
2011-09-26 10:58:00 +00:00
Chandler Carruth e31c1b4a42 Add a test for the display of diagnostic options and categories. This
would have caught a bug I introduced during refactoring. Silly me
thinking this was all well tested already...

If any of this is already covered by other tests, let me know. I looked
around and didn't see any.

llvm-svn: 140522
2011-09-26 10:42:40 +00:00
Argyrios Kyrtzidis 4bdd6aa198 Associate the macro arguments location map with a FileID instead
of a ContentCache, since multiple FileIDs can have the same ContentCache
but the expanded macro arguments locations will be different.

llvm-svn: 140521
2011-09-26 08:01:50 +00:00
Argyrios Kyrtzidis 4acad5b092 Remove SourceManager::getLocation().
It's not descriptive enough and it's just a call of translateFileLineCol()
followed by a call to getMacroArgExpandedLocation(), which is better to be
called explicitly since it has a certain cost and is not always required.

llvm-svn: 140520
2011-09-26 08:01:45 +00:00
Argyrios Kyrtzidis 4cdfcae75d Don't map a file:line:col triplet that is inside the preamble range to
a "loaded" location of the precompiled preamble.

Instead, handle specially locations of preprocessed entities:
-When looking up for preprocessed entities, map main file locations inside the
 preamble range to a preamble loaded location.
-When getting the source range of a preprocessing cursor, map preamble loaded
 locations back to main file locations.

Fixes rdar://10175093 & http://llvm.org/PR10999

llvm-svn: 140519
2011-09-26 08:01:41 +00:00
Greg Clayton 8f7180b11e Added more functionality to the public API to allow for better
symbolication. Also improved the SBInstruction API to allow
access to the instruction opcode name, mnemonics, comment and
instruction data.

Added the ability to edit SBLineEntry objects (change the file,
line and column), and also allow SBSymbolContext objects to be
modified (set module, comp unit, function, block, line entry
or symbol). 

The SymbolContext and SBSymbolContext can now generate inlined
call stack infomration for symbolication much easier using the
SymbolContext::GetParentInlinedFrameInfo(...) and 
SBSymbolContext::GetParentInlinedFrameInfo(...) methods.

llvm-svn: 140518
2011-09-26 07:11:27 +00:00
David Meyer 1748b37acd Only run tests in test/CodeGen/CBackend/X86 when both X86 and CBackend are supported
llvm-svn: 140517
2011-09-26 06:44:27 +00:00
David Meyer b1fbf9ff26 PR11004: Inline memcpy to avoid generating nested call sequence. Un-XFAIL 2011-06-09-TailCallByVal and 2010-11-04-BigByval
llvm-svn: 140516
2011-09-26 06:13:20 +00:00
Craig Topper 45faba98b4 Fix VEX decoding in i386 mode. Fixes PR11008.
llvm-svn: 140515
2011-09-26 05:12:43 +00:00
Zhongxing Xu 2d17ff466e Properly initialize Preprocessor::CurLexerKind to avoid use of uninitialized variable.
llvm-svn: 140514
2011-09-26 03:37:43 +00:00
Benjamin Kramer 6f4f307d1f Turns out we tested for this typo.
llvm-svn: 140513
2011-09-26 02:32:23 +00:00
Benjamin Kramer f0e3fac994 Add missing spaces in diagnostic messages.
llvm-svn: 140512
2011-09-26 02:14:16 +00:00
Benjamin Kramer e2125d8278 Don't print a stray ] at the end of diagnostics.
Also remove an obsolete utostr call.

llvm-svn: 140511
2011-09-26 02:14:13 +00:00
Peter Collingbourne cfd2356180 Move VTable builder to AST
llvm-svn: 140510
2011-09-26 01:57:12 +00:00
Peter Collingbourne 1c593c6a38 Have CodeGenVTables::GenerateConstructionVTable use VTableLayout
llvm-svn: 140509
2011-09-26 01:57:04 +00:00
Peter Collingbourne 085095f1ac Move vtable dumper call to VTableBuilder ctor
llvm-svn: 140508
2011-09-26 01:57:00 +00:00
Peter Collingbourne 3b118abd93 Implement VTableContext::createConstructionVTableLayout
llvm-svn: 140507
2011-09-26 01:56:55 +00:00
Peter Collingbourne affe111ba5 Move all vtable layout data into new VTableLayout class
llvm-svn: 140506
2011-09-26 01:56:50 +00:00
Peter Collingbourne cd3c3f4f3d Move VTableComponent to header file
llvm-svn: 140505
2011-09-26 01:56:45 +00:00
Peter Collingbourne 5ee9ee490e Move vtable component accessors to VTableContext
llvm-svn: 140504
2011-09-26 01:56:41 +00:00
Peter Collingbourne 71c26936a0 Remove CodeGenVTables::ComputeVTableRelatedInformation dependency on CodeGen
llvm-svn: 140503
2011-09-26 01:56:36 +00:00
Peter Collingbourne a834166e48 Create a VTableContext class and start moving CodeGenVTables methods to it
llvm-svn: 140502
2011-09-26 01:56:30 +00:00
Peter Collingbourne 2d2595235d Move VTT builder to AST
llvm-svn: 140501
2011-09-26 01:56:24 +00:00
Peter Collingbourne 66c3a83e09 Move BaseSubobject class to AST
llvm-svn: 140500
2011-09-26 01:56:16 +00:00
Peter Collingbourne 2000e4ead5 Remove CodeGenModule field from VTTBuilder
llvm-svn: 140499
2011-09-26 01:56:10 +00:00
Peter Collingbourne d9eb79ca73 Make the VTTBuilder class independent of LLVM core
llvm-svn: 140498
2011-09-26 01:56:06 +00:00
Chandler Carruth d16b42ef92 Remove support for splitting word-wrapped diagnostic messages on newline
characters. I could find no newline character in a diagnostic message,
and adding an assert to this code never fires in the testsuite.

I think this code is essentially dead, and was previously used for
a different purpose. If I just don't understand how it is we can end up
with a newline here please let me know (with a test case?) and I'll
revert.

llvm-svn: 140497
2011-09-26 01:44:29 +00:00
Chandler Carruth b1e536bb3a Move the word wrapped printing routine down to all the other helper
printing routines, clean up its doxyments and switch it to a camelCase
name as well. No functionality changed here.

llvm-svn: 140496
2011-09-26 01:44:27 +00:00
Chandler Carruth cf259a47e2 Switch some of my recently added helper functions to use the proper
style, and add doxyments.

llvm-svn: 140495
2011-09-26 01:30:09 +00:00
Chandler Carruth 0059a9bee0 Rewrite the printing of diagnostic options, categories, etc to actually
use the ostream interface and avoid lots of temporary strings.

llvm-svn: 140494
2011-09-26 01:21:58 +00:00
David Blaikie b5784324b3 Rename DiagnosticInfo to Diagnostic as per issue 5397
llvm-svn: 140493
2011-09-26 01:18:08 +00:00
David Blaikie 53c125d063 Rename PathDiagnosticClient to PathDiagnosticConsumer as per issue 5397
llvm-svn: 140492
2011-09-26 00:51:36 +00:00
Chandler Carruth 292e76939b Delete an extraneous line I missed.
llvm-svn: 140491
2011-09-26 00:45:02 +00:00
Chandler Carruth 6074084fa8 A direct extraction of the rest of the option printing into a helper.
This needs to be cleaned up to better use the ostream object, WIP.

llvm-svn: 140490
2011-09-26 00:44:09 +00:00
David Blaikie 69609dcead Rename VerifyDiagnosticsClient to VerifyDiagnosticConsumer as per issue 5397
llvm-svn: 140489
2011-09-26 00:38:03 +00:00
Chandler Carruth b59f9cb9ce Start a more correct pattern for factoring out the name printing. Slowly
I'm planning to switch a bunch of these over to use a raw_ostream
instead of += on a string object.

llvm-svn: 140488
2011-09-26 00:37:30 +00:00
Chandler Carruth 09c65ce3a3 Revert r140484. That was *not* ready to be committed! Only halfway done,
and completely broken at that.

Sorry, must remember to stash rather than commit. =]

llvm-svn: 140487
2011-09-26 00:26:47 +00:00
Chandler Carruth 6849652cf8 Fix a formatting goof.
llvm-svn: 140486
2011-09-26 00:21:50 +00:00
David Blaikie 8b00dcb03b Rename ChainedDiagnosticClient to ChainedDiagnosticConsumer as per issue 5397
llvm-svn: 140485
2011-09-26 00:21:47 +00:00
Chandler Carruth b7e3f42a01 Extract the diagnostic message formatting into a helper routine.
llvm-svn: 140484
2011-09-26 00:21:47 +00:00
David Blaikie f18d91a4b2 Rename StoredDiagnosticClient to StoredDiagnosticConsumer as per issue 5397
llvm-svn: 140483
2011-09-26 00:01:39 +00:00
David Blaikie a24a0bcd0d Rename CaptureDiagnosticClient to CaptureDiagnosticConsumer as per issue 5397
llvm-svn: 140482
2011-09-25 23:54:33 +00:00
Chandler Carruth 0216058a97 Extract the logic for printing a colorful level name into a helper
function.

llvm-svn: 140481
2011-09-25 23:51:01 +00:00
David Blaikie 2cb2a836eb Rename IgnoringDiagClient to IgnoringDiagConsumer as per issue 5397
llvm-svn: 140480
2011-09-25 23:44:35 +00:00
David Blaikie e2eefaecc8 Rename DiagnosticClient to DiagnosticConsumer as per issue 5397
llvm-svn: 140479
2011-09-25 23:39:51 +00:00
David Blaikie 9c902b5502 Rename Diagnostic to DiagnosticsEngine as per issue 5397
llvm-svn: 140478
2011-09-25 23:23:43 +00:00
Chandler Carruth 74e2c35fbc Inline this method now that its completely trivial, and prepare for
hoisting parts of the text diagnostic.

llvm-svn: 140477
2011-09-25 23:01:05 +00:00
Chandler Carruth 84f361950f Shuffle some names around. 'CaretDiagnostic' is inaccurate as this needs
to handle non-caret diagnostics as well in order to be fully useful in
libclang etc. Also sketch out some more of my plans on this refactoring.

llvm-svn: 140476
2011-09-25 22:54:56 +00:00
Chandler Carruth 3236f0d25c Actually remove the members of CaretDiagnostic no longer in use for
tracking the start and stop of macro expansion suppression. Also remove
the Columns variable which was just a convenience variable based on
DiagOpts. Instead we materialize it in the one piece of code that cared.

llvm-svn: 140475
2011-09-25 22:31:58 +00:00