Alexey Samsonov [Thu, 17 Jan 2013 11:12:32 +0000 (11:12 +0000)]
ASan: add optional 'zero-based shadow' option to ASan passes. Always tell the values of shadow scale and offset to the runtime
llvm-svn: 172709
Elena Demikhovsky [Thu, 17 Jan 2013 09:59:53 +0000 (09:59 +0000)]
Optimization for the following SIGN_EXTEND pairs:
v8i8 -> v8i64,
v8i8 -> v8i32,
v4i8 -> v4i64,
v4i16 -> v4i64
for AVX and AVX2.
Bug 14865.
llvm-svn: 172708
David Blaikie [Thu, 17 Jan 2013 08:49:22 +0000 (08:49 +0000)]
Improve -Wreorder to handle cases of anonymous class member ordering
llvm-svn: 172707
NAKAMURA Takumi [Thu, 17 Jan 2013 07:27:55 +0000 (07:27 +0000)]
clang/test/Index/code-completion-skip-bodies.cpp: Check stdout and stderr individually, rather than mixed output of stdout and stderr with 2>&1.
XFAIL(s) are removed.
llvm-svn: 172705
Craig Topper [Thu, 17 Jan 2013 06:59:42 +0000 (06:59 +0000)]
Combine AVX and SSE forms of MOVSS and MOVSD into the same multiclasses so they get instantiated together.
llvm-svn: 172704
Nico Weber [Thu, 17 Jan 2013 06:14:50 +0000 (06:14 +0000)]
Revert most of r172140.
r172140 changed the formatter to produce "-(id) foo" instead of "- (id)foo"
in google style, with a link to
http://google-styleguide.googlecode.com/svn/trunk/objcguide.xml#Method_Declarations_and_Definitions
as reference. But now that I look at that link again, it seems I didn't
read it very carefully the first time round.
llvm-svn: 172703
Jason Molenda [Thu, 17 Jan 2013 05:34:17 +0000 (05:34 +0000)]
Add one more bit of logging for armv7 watchpoint debugging.
llvm-svn: 172702
David Blaikie [Thu, 17 Jan 2013 05:26:25 +0000 (05:26 +0000)]
ArrayRef-ize some ctor initializer related APIs
llvm-svn: 172701
David Blaikie [Thu, 17 Jan 2013 05:26:21 +0000 (05:26 +0000)]
Remove some unnecessary casts
llvm-svn: 172700
Eric Christopher [Thu, 17 Jan 2013 03:00:04 +0000 (03:00 +0000)]
Fix the assembly and dissassembly of DW_FORM_sec_offset. Found this by
changing both the string of the dwo_name to be correct and the type of
the statement list.
Testcases all around.
llvm-svn: 172699
Eric Christopher [Thu, 17 Jan 2013 02:59:59 +0000 (02:59 +0000)]
Add the DW_AT_GNU_addr_base for the skeleton cu. Add support for
emitting the dwarf32 version of DW_FORM_sec_offset and correct
disassembler support.
llvm-svn: 172698
David Blaikie [Thu, 17 Jan 2013 02:43:00 +0000 (02:43 +0000)]
Add test for PR12938, fixed by Richard Smith in r172691
llvm-svn: 172697
Matt Beaumont-Gay [Thu, 17 Jan 2013 02:06:08 +0000 (02:06 +0000)]
Suppress all -Wunused-value warnings from macro body expansions.
This is inspired by a number of false positives in real code, including
PR14968. I've added test cases reduced from these false positives to
test/Sema/unused-expr.c, as well as corresponding test cases that pass the
offending expressions as arguments to a no-op macro to ensure that we do warn
there.
This also removes my previous tweak from r166522/r166534, so that we warn on
unused cast expressions in macro arguments.
There were several test cases that were using -Wunused-value to test general
diagnostic emission features; I changed those to use other warnings or warn on
a macro argument expression. I stared at the test case for PR14399 for a while
with Richard Smith and we believe the new test case exercises the same
codepaths as before.
llvm-svn: 172696
Douglas Gregor [Thu, 17 Jan 2013 01:58:31 +0000 (01:58 +0000)]
Add a comment for Daniel
llvm-svn: 172695
Richard Smith [Thu, 17 Jan 2013 01:46:13 +0000 (01:46 +0000)]
Test that we correctly handle reversion of line splicing etc in raw string
literals. As suggested by Sean Silva.
llvm-svn: 172694
Richard Smith [Thu, 17 Jan 2013 01:40:50 +0000 (01:40 +0000)]
Attempt to work around bug in older GCCs to fix buildbot.
llvm-svn: 172693
Daniel Dunbar [Thu, 17 Jan 2013 01:35:06 +0000 (01:35 +0000)]
[IRgen] Update modules autolink metadata to use module flags (as now specified
in the LangRef).
llvm-svn: 172692
Richard Smith [Thu, 17 Jan 2013 01:30:42 +0000 (01:30 +0000)]
Implement C++11 semantics for [[noreturn]] attribute. This required splitting
it apart from [[gnu::noreturn]] / __attribute__((noreturn)), since their
semantics are not equivalent (for instance, we treat [[gnu::noreturn]] as
affecting the function type, whereas [[noreturn]] does not).
llvm-svn: 172691
Richard Smith [Thu, 17 Jan 2013 01:17:56 +0000 (01:17 +0000)]
Add -Wunsequenced (with compatibility alias -Wsequence-point) to warn on
expressions which have undefined behavior due to multiple unsequenced
modifications or an unsequenced modification and use of a variable.
llvm-svn: 172690
NAKAMURA Takumi [Thu, 17 Jan 2013 01:07:09 +0000 (01:07 +0000)]
clang/test/Modules/compiler_builtins.m: Mark this as XFAIL:win32 for now. Investigating.
llvm-svn: 172689
Jakob Stoklund Olesen [Thu, 17 Jan 2013 01:06:04 +0000 (01:06 +0000)]
Move MachineTraceMetrics.h into include/llvm/CodeGen.
Let targets use it.
llvm-svn: 172688
Jakob Stoklund Olesen [Thu, 17 Jan 2013 00:58:38 +0000 (00:58 +0000)]
Provide a place for targets to insert ILP optimization passes.
Move the early if-conversion pass into this group.
ILP optimizations usually need to find the right balance between
register pressure and ILP using the MachineTraceMetrics analysis to
identify critical paths and estimate other costs. Such passes should run
together so they can share dominator tree and loop info analyses.
Besides if-conversion, future passes to run here here could include
expression height reduction and ARM's MLxExpansion pass.
llvm-svn: 172687
Douglas Gregor [Thu, 17 Jan 2013 00:38:46 +0000 (00:38 +0000)]
Treat hidden Objective-C protocol definitions as if they were
undefined, and don't find methods or protocols within those protocol
definitions. This completes <rdar://problem/
10634711>.
llvm-svn: 172686
Jack Carter [Thu, 17 Jan 2013 00:28:20 +0000 (00:28 +0000)]
This is a resubmittal. For some reason it broke the bots yesterday
but I cannot reproduce the problem and have scrubed my sources and
even tested with llvm-lit -v --vg.
The Mips RDHWR (Read Hardware Register) instruction was not
tested for assembler or dissassembler consumption. This patch
adds that functionality.
Contributer: Vladimir Medic
llvm-svn: 172685
Dmitri Gribenko [Thu, 17 Jan 2013 00:26:13 +0000 (00:26 +0000)]
Implement a fixit for -Wmain-return-type
llvm-svn: 172684
Fariborz Jahanian [Thu, 17 Jan 2013 00:25:06 +0000 (00:25 +0000)]
objC block layout: Patch reorders block layout to
produce more inline layout metadata. // rdar://
12752901
llvm-svn: 172683
Matt Beaumont-Gay [Thu, 17 Jan 2013 00:21:55 +0000 (00:21 +0000)]
Fix a typo introduced in r172665.
llvm-svn: 172682
Daniel Dunbar [Thu, 17 Jan 2013 00:16:27 +0000 (00:16 +0000)]
[IR] Reserve/define the purpose for the "Linker Options" metadata flags.
llvm-svn: 172681
Lang Hames [Thu, 17 Jan 2013 00:00:49 +0000 (00:00 +0000)]
Update the description of the llvm.fmuladd.* intrinsics to avoid use of the
ambiguous term 'legal'.
Suggested by Andrew Booker. Thanks Andrew!
llvm-svn: 172680
Argyrios Kyrtzidis [Wed, 16 Jan 2013 23:54:48 +0000 (23:54 +0000)]
[objcmt] Rewrite a NSDictionary dictionaryWithObjects:forKeys: to a dictionary literal
if we can see the elements of the arrays.
for example:
NSDictionary *dict = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"1", @"2", nil] forKeys:[NSArray arrayWithObjects:@"A", @"B", nil]];
-->
NSDictionary *dict = @{ @"A" : @"1", @"B" : @"2" };
rdar://
12428166
llvm-svn: 172679
Rafael Espindola [Wed, 16 Jan 2013 23:49:06 +0000 (23:49 +0000)]
Delay linkage checks when validating the weakref attribute.
llvm-svn: 172678
Dmitri Gribenko [Wed, 16 Jan 2013 23:40:37 +0000 (23:40 +0000)]
Documentation: fix a typo 'IEE754'
Reported on IRC by _savage
llvm-svn: 172677
Aaron Ballman [Wed, 16 Jan 2013 23:39:10 +0000 (23:39 +0000)]
Fixes crash when illegal function definitions are deleted or defaulted. Fixes PR14577.
llvm-svn: 172676
Michael J. Spencer [Wed, 16 Jan 2013 23:34:45 +0000 (23:34 +0000)]
[ELF] Use operator new(std::size_t, BumpPtrAllocator).
llvm-svn: 172675
Michael J. Spencer [Wed, 16 Jan 2013 23:34:32 +0000 (23:34 +0000)]
[ELF] clang-format ReaderELF.cpp
llvm-svn: 172674
Rafael Espindola [Wed, 16 Jan 2013 23:21:32 +0000 (23:21 +0000)]
Simplify code. No functionality change.
llvm-svn: 172673
David Blaikie [Wed, 16 Jan 2013 23:18:16 +0000 (23:18 +0000)]
Remove unnecessary initialization i Added in r172668.
echristo already fixed this in r172649, but I'll leave the reformatting in
since I'm in the blame history for it now anyway.
llvm-svn: 172672
Enrico Granata [Wed, 16 Jan 2013 23:17:30 +0000 (23:17 +0000)]
Adding a custom summary for libc++ std::vector<bool>
vector<bool> is specialized and the existing general summary for vectors would lie to the user.
Tackling libstdc++ and synthetic children is the following, less critical, part of this task
llvm-svn: 172671
Aaron Ballman [Wed, 16 Jan 2013 23:17:21 +0000 (23:17 +0000)]
Wrapping __popcnt64 for MSVC so that it's only used on 64-bit builds.
llvm-svn: 172670
David Blaikie [Wed, 16 Jan 2013 23:13:42 +0000 (23:13 +0000)]
Readd an open paren that was lost while reformatting code.
llvm-svn: 172669
David Blaikie [Wed, 16 Jan 2013 23:13:36 +0000 (23:13 +0000)]
Fix -Wreorder warning.
Rewrapping courtesy of clang-format.
llvm-svn: 172668
Rafael Espindola [Wed, 16 Jan 2013 23:11:15 +0000 (23:11 +0000)]
Check for internal weak decls after merging.
This fixes pr14946. The problem was that the linkage computation was done too
early, so things like "extern int a;" would be given external linkage, even if
a previous declaration was static.
llvm-svn: 172667
David Blaikie [Wed, 16 Jan 2013 23:08:36 +0000 (23:08 +0000)]
PR14964: intrinsic headers using non-reserved identifiers
Several of the intrinsic headers were using plain non-reserved identifiers.
C++11 17.6.4.3.2 [global.names] p1 reservers names containing a double
begining with an underscore followed by an uppercase letter for any use.
I think I got them all, but open to being corrected. For the most part I
didn't bother updating function-like macro parameter names because I don't
believe they're subject to any such collission - though some function-like
macros already follow this convention (I didn't update them in part because
the churn was more significant as several function-like macros use the double
underscore prefixed version of the same name as a parameter in their
implementation)
llvm-svn: 172666
Douglas Gregor [Wed, 16 Jan 2013 23:00:23 +0000 (23:00 +0000)]
Rework the traversal of Objective-C categories and extensions to
consider (sub)module visibility.
The bulk of this change replaces myriad hand-rolled loops over the
linked list of Objective-C categories/extensions attached to an
interface declaration with loops using one of the four new category
iterator kinds:
visible_categories_iterator: Iterates over all visible categories
and extensions, hiding any that have their "hidden" bit set. This is
by far the most commonly used iterator.
known_categories_iterator: Iterates over all categories and
extensions, ignoring the "hidden" bit. This tends to be used for
redeclaration-like traversals.
visible_extensions_iterator: Iterates over all visible extensions,
hiding any that have their "hidden" bit set.
known_extensions_iterator: Iterates over all extensions, whether
they are visible to normal name lookup or not.
The effect of this change is that any uses of the visible_ iterators
will respect module-import visibility. See the new tests for examples.
Note that the old accessors for categories and extensions are gone;
there are *Raw() forms for some of them, for those (few) areas of the
compiler that have to manipulate the linked list of categories
directly. This is generally discouraged.
Part two of <rdar://problem/
10634711>.
llvm-svn: 172665
Peter Collingbourne [Wed, 16 Jan 2013 22:37:09 +0000 (22:37 +0000)]
Use getProcessTriple in clang-interpreter.
llvm-svn: 172664
Enrico Granata [Wed, 16 Jan 2013 22:25:17 +0000 (22:25 +0000)]
Changing the Python reference document to be more explicit in discouraging usage of lldb.{debugger,...} convenience variables for formatters and other non-interactive Python extensions
llvm-svn: 172663
Greg Clayton [Wed, 16 Jan 2013 22:22:42 +0000 (22:22 +0000)]
Removed unused variable.
llvm-svn: 172662
Dmitri Gribenko [Wed, 16 Jan 2013 22:10:09 +0000 (22:10 +0000)]
Fix a -Wdocumentation warning (empty paragraph passed to '\brief' command)
llvm-svn: 172661
Richard Smith [Wed, 16 Jan 2013 21:43:09 +0000 (21:43 +0000)]
Add raw string literal versus C preprocessor test, suggested by James Dennett.
llvm-svn: 172660
Daniel Dunbar [Wed, 16 Jan 2013 21:38:56 +0000 (21:38 +0000)]
[IR] Add 'Append' and 'AppendUnique' module flag behaviors.
llvm-svn: 172659
Renato Golin [Wed, 16 Jan 2013 21:29:55 +0000 (21:29 +0000)]
Change CostTable model to be global to all targets
Moving the X86CostTable to a common place, so that other back-ends
can share the code. Also simplifying it a bit and commoning up
tables with one and two types on operations.
llvm-svn: 172658
Edwin Vane [Wed, 16 Jan 2013 21:11:50 +0000 (21:11 +0000)]
Write transform results to disk only once
Instead of writing the result of each transform to disk for every
transform, write the results to buffers in memory and pass those buffers
to the next transform as input. Only write the buffers to disk if the
final syntax check passes.
Reviewers: klimek
llvm-svn: 172657
Michael Gottesman [Wed, 16 Jan 2013 21:07:18 +0000 (21:07 +0000)]
Added test for r172599 which fixes bugzilla://14584,rdar://
11744105.
llvm-svn: 172656
Michael J. Spencer [Wed, 16 Jan 2013 20:50:43 +0000 (20:50 +0000)]
[Support] Include the intrisics header and check for definition properly.
llvm-svn: 172655
Tim Northover [Wed, 16 Jan 2013 20:35:54 +0000 (20:35 +0000)]
Fix recent test for more diverse environments.
I think the main issue was the lack of -ffreestanding, which pulled in
the host's stdint.h. After that things went rapidly downhill.
llvm-svn: 172653
Eric Christopher [Wed, 16 Jan 2013 20:31:35 +0000 (20:31 +0000)]
Make this test X86 only.
llvm-svn: 172652
Eric Christopher [Wed, 16 Jan 2013 20:31:32 +0000 (20:31 +0000)]
Move this to X86.
llvm-svn: 172651
Tim Northover [Wed, 16 Jan 2013 20:13:15 +0000 (20:13 +0000)]
Correct order of operands forwarding NEON vfma to LLVM fma
llvm-svn: 172650
Eric Christopher [Wed, 16 Jan 2013 20:09:36 +0000 (20:09 +0000)]
Move initialization of ParsingIfOrElifDirective down next to the macro
initializations to fix Wreorder warning.
llvm-svn: 172649
Eric Christopher [Wed, 16 Jan 2013 19:54:35 +0000 (19:54 +0000)]
Add testcase missed yesterday. Patch from Paul Robinson.
llvm-svn: 172648
Greg Clayton [Wed, 16 Jan 2013 19:53:55 +0000 (19:53 +0000)]
Remove std::string input arguments and replace with "const char *".
llvm-svn: 172647
Eric Christopher [Wed, 16 Jan 2013 19:53:47 +0000 (19:53 +0000)]
Add testcase missed yesterday from Paul Robinson.
llvm-svn: 172646
Michael J. Spencer [Wed, 16 Jan 2013 19:52:12 +0000 (19:52 +0000)]
[Support] Add MSVC intrinsic for CountPopulation.
Patch by Jakub Staszak.
llvm-svn: 172645
Michael J. Spencer [Wed, 16 Jan 2013 19:51:59 +0000 (19:51 +0000)]
[Support] Update MSVC compiler support in Compiler.h.
llvm-svn: 172644
Aaron Ballman [Wed, 16 Jan 2013 19:51:19 +0000 (19:51 +0000)]
Adding verbiage to the Language Extensions document about __has_include and __has_include_next only being allowed within preprocessor directives.
llvm-svn: 172643
Eli Bendersky [Wed, 16 Jan 2013 19:42:16 +0000 (19:42 +0000)]
Remove unneeded include and empty line
llvm-svn: 172642
Enrico Granata [Wed, 16 Jan 2013 19:41:57 +0000 (19:41 +0000)]
Replacing reference to radar number with svn revision
llvm-svn: 172641
Eli Bendersky [Wed, 16 Jan 2013 19:32:36 +0000 (19:32 +0000)]
Some small (and mostly cosmetic) fixes.
llvm-svn: 172640
Aaron Ballman [Wed, 16 Jan 2013 19:32:21 +0000 (19:32 +0000)]
No longer crashing with an assert when __has_include or __has_include_next is used outside of a preprocessor directive. This fixes PR14837.
llvm-svn: 172639
Eli Bendersky [Wed, 16 Jan 2013 19:00:21 +0000 (19:00 +0000)]
Clean up some unnecessary headers and forward declarations
llvm-svn: 172638
Eli Bendersky [Wed, 16 Jan 2013 18:56:50 +0000 (18:56 +0000)]
Now that GenericAsmParser was folded into AsmParser, some methods and types can
return into the safe harbor of AsmParser's private areas.
llvm-svn: 172637
Enrico Granata [Wed, 16 Jan 2013 18:53:52 +0000 (18:53 +0000)]
<rdar://problem/
13021266>
Adding FindFirstGlobalVariable to SBModule and SBTarget
These calls work like FindGlobalVariables but they only return the first match found and so they can return an SBValue instead of an SBValueList for added convenience of use
llvm-svn: 172636
Douglas Gregor [Wed, 16 Jan 2013 18:47:38 +0000 (18:47 +0000)]
Teach global selector lookup to ignore hidden methods, which occur
when the methods are declared in a submodule that has not yet been
imported. Part of <rdar://problem/
10634711>.
llvm-svn: 172635
Daniel Dunbar [Wed, 16 Jan 2013 18:39:23 +0000 (18:39 +0000)]
[Linker] Change module flag linking to be more extensible.
- Instead of computing a bunch of buckets of different flag types, just do an
incremental link resolving conflicts as they arise.
- This also has the advantage of making the link result deterministic and not
dependent on map iteration order.
llvm-svn: 172634
Enrico Granata [Wed, 16 Jan 2013 18:34:23 +0000 (18:34 +0000)]
Greg created a new API on SBProcess to get an ID that is guaranteed to be unique even in situations where underlying platforms would actually duplicate or hardcode PIDs
The Python data formatters use a per-process cache that was previously keying off the PID. Moving that to be based on this new notion of unique ID.
llvm-svn: 172633
Argyrios Kyrtzidis [Wed, 16 Jan 2013 18:13:00 +0000 (18:13 +0000)]
[libclang] In clang_reparseTranslationUnit_Impl, move the check whether TU is
null before using it.
llvm-svn: 172632
Howard Hinnant [Wed, 16 Jan 2013 17:56:06 +0000 (17:56 +0000)]
Make a few tests optimization-proof. These tests were failing under -O3 because the optimizer was eliminating the call to new.
llvm-svn: 172631
Kevin Enderby [Wed, 16 Jan 2013 17:46:23 +0000 (17:46 +0000)]
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 the first of two steps to allow us to do that. This is the llvm-mc
change to provide a method to set the AT_producer string. The second step,
coming soon to a clang near you, will have the clang driver pass the value
of getClangFullVersion() via an flag when invoking the integrated assembler
on assembly source files.
rdar://
12955296
llvm-svn: 172630
Argyrios Kyrtzidis [Wed, 16 Jan 2013 17:42:07 +0000 (17:42 +0000)]
[PCH/Modules] The iterator may become invalidated because a new macro can be added
while deserializing a macro, make sure to copy/move what we need from it.
Fixes clang-x86_64-debian-fast bot.
llvm-svn: 172629
Greg Clayton [Wed, 16 Jan 2013 17:29:04 +0000 (17:29 +0000)]
<rdar://problem/
13009943>
Added a unique integer identifier to processes. Some systems, like JTAG or other simulators, might always assign the same process ID (pid) to the processes that are being debugged. In order for scripts and the APIs to uniquely identify the processes, there needs to be another ID. Now the SBProcess class has:
uint32_t SBProcess::GetUniqueID();
This integer ID will help to truly uniquely identify a process and help with appropriate caching that can be associated with a SBProcess object.
llvm-svn: 172628
Peter Collingbourne [Wed, 16 Jan 2013 17:27:22 +0000 (17:27 +0000)]
Introduce llvm::sys::getProcessTriple() function.
In r143502, we renamed getHostTriple() to getDefaultTargetTriple()
as part of work to allow the user to supply a different default
target triple at configure time. This change also affected the JIT.
However, it is inappropriate to use the default target triple in the
JIT in most circumstances because this will not necessarily match
the current architecture used by the process, leading to illegal
instruction and other such errors at run time.
Introduce the getProcessTriple() function for use in the JIT and
its clients, and cause the JIT to use it. On architectures with a
single bitness, the host and process triples are identical. On other
architectures, the host triple represents the architecture of the
host CPU, while the process triple represents the architecture used
by the host CPU to interpret machine code within the current process.
For example, when executing 32-bit code on a 64-bit Linux machine,
the host triple may be 'x86_64-unknown-linux-gnu', while the process
triple may be 'i386-unknown-linux-gnu'.
This fixes JIT for the 32-on-64-bit (and vice versa) build on non-Apple
platforms.
Differential Revision: http://llvm-reviews.chandlerc.com/D254
llvm-svn: 172627
Reed Kotler [Wed, 16 Jan 2013 17:10:28 +0000 (17:10 +0000)]
First step in implementation of mips16 and nomips16 attributes.
Waiting for new llvm attribute code for the next step.
llvm-svn: 172626
Argyrios Kyrtzidis [Wed, 16 Jan 2013 17:04:31 +0000 (17:04 +0000)]
[libclang] In clang_getCursorType, don't crash if the translation unit is not
set on the cursor; return a null type in such a case.
llvm-svn: 172625
Daniel Jasper [Wed, 16 Jan 2013 17:00:50 +0000 (17:00 +0000)]
Fix a bug where we would move a following line into a comment.
Before: Constructor() : a(a), // comment a(a) {}
After: Constructor() : a(a), // comment
a(a) {}
Needed this as a quick fix. Will add more tests for this in a future
commit.
llvm-svn: 172624
Argyrios Kyrtzidis [Wed, 16 Jan 2013 16:52:44 +0000 (16:52 +0000)]
[preprocessor] Call the MacroUndefined callback even when the macro was not defined.
Patch by Enea Zaffanella!
llvm-svn: 172623
Eli Bendersky [Wed, 16 Jan 2013 16:52:08 +0000 (16:52 +0000)]
Replace virtual hasFixups with explicit fragment type checks
llvm-svn: 172622
Daniel Jasper [Wed, 16 Jan 2013 16:23:19 +0000 (16:23 +0000)]
Fix parsing error in conditional expressions.
We used to incorrectly parse
aaaaaa ? aaaaaa(aaaaaa) :
aaaaaaaa;
Due to an l_paren being followed by a colon, we assumed it to be part of
a constructor initializer. Thus, we never found the colon belonging to
the conditional expression, marked the line as bing incorrect and did
not format it.
llvm-svn: 172621
Argyrios Kyrtzidis [Wed, 16 Jan 2013 16:19:38 +0000 (16:19 +0000)]
[PCH/Modules] Change how macro [re]definitions are de/serialized.
Previously we would serialize the macro redefinitions as a list, part of
the identifier, and try to chain them together across modules individually
without having the info that they were already chained at definition time.
Change this by serializing the macro redefinition chain and then try
to synthesize the chain parts across modules. This allows us to correctly
pinpoint when 2 different definitions are ambiguous because they came from
unrelated modules.
Fixes bogus "ambiguous expansion of macro" warning when a macro in a PCH
is redefined without undef'ing it first.
rdar://
13016031
llvm-svn: 172620
Daniel Jasper [Wed, 16 Jan 2013 16:04:06 +0000 (16:04 +0000)]
Improve understanding of unary operators.
Before: int x = ** a;
After: int x = **a;
llvm-svn: 172619
Daniel Jasper [Wed, 16 Jan 2013 15:44:34 +0000 (15:44 +0000)]
Disable inlining of short ifs in Google style.
Various reasons seem to speak against it, so I am disabling this for
now.
Changed tests to still test this option.
llvm-svn: 172618
Daniel Jasper [Wed, 16 Jan 2013 14:59:02 +0000 (14:59 +0000)]
Add option to avoid "bin-packing" of parameters.
"Bin-packing" here means allowing multiple parameters on one line, if a
function call/declaration is spread over multiple lines.
This is required by the Chromium style guide and probably desired for
the Google style guide. Not making changes to LLVM style as I don't have
enough data.
With this enabled, we format stuff like:
aaaaaaaaaaaaaaa(
aaaaaaaaaa,
aaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaaaaa).
aaaaaaaaaaaaaaaaaa();
llvm-svn: 172617
Manuel Klimek [Wed, 16 Jan 2013 14:55:28 +0000 (14:55 +0000)]
Add debugging support for split penalties.
llvm-svn: 172616
Evgeniy Stepanov [Wed, 16 Jan 2013 14:41:46 +0000 (14:41 +0000)]
Allow vectors in CreatePointerCast of constants.
llvm-svn: 172615
Evgeniy Stepanov [Wed, 16 Jan 2013 14:38:50 +0000 (14:38 +0000)]
A test for r172535.
llvm-svn: 172614
Dmitry Vyukov [Wed, 16 Jan 2013 14:35:13 +0000 (14:35 +0000)]
asan: fix ARM build
llvm-svn: 172613
Benjamin Kramer [Wed, 16 Jan 2013 13:43:56 +0000 (13:43 +0000)]
Remove unused leftover header (it moved to llvm/IR).
llvm-svn: 172612
Benjamin Kramer [Wed, 16 Jan 2013 13:25:56 +0000 (13:25 +0000)]
Move test that depends on the x86 target into a target-specific directory.
Should fix the arm buildbot (which only builds the arm target).
llvm-svn: 172611
Alexey Samsonov [Wed, 16 Jan 2013 13:23:28 +0000 (13:23 +0000)]
ASan: wrap mapping scale and offset in a struct and make it a member of ASan passes. Add test for non-default mapping scale and offset. No functionality change
llvm-svn: 172610
Benjamin Kramer [Wed, 16 Jan 2013 13:19:59 +0000 (13:19 +0000)]
Remove triple from this test, it makes it fail when X86 TTI is missing.
Without a triple opt falls back to NoTTI which comes closer to LSR's pre-TTI behavior.
llvm-svn: 172609
Manuel Klimek [Wed, 16 Jan 2013 12:31:12 +0000 (12:31 +0000)]
Use standard llvm Debug.h support for debugging output.
Leave a quick "// Uncomment this." hint to enable the debug output in
tests. FIXME: figure out whether we want to enable debug command line
handling for all tests.
llvm-svn: 172608