Commit Graph

49994 Commits

Author SHA1 Message Date
Chandler Carruth 1b3304de4d [PM] Update Clang to reflect the new header for the bitcode writer pass
added in LLVM r199078.

llvm-svn: 199079
2014-01-13 07:47:38 +00:00
NAKAMURA Takumi f0a1ab8f2a [CMake] Move BUG_REPORT_URL from clang to llvm.
It was too late to set BUG_REPORT_URL after configure_file(config.h).
BUG_REPORT_URL in config.h.cmake would be updated at 2nd run of cmake.
It caused many recompilations.

FYI, configure handles BUG_REPORT_URL in llvm side.

llvm-svn: 199076
2014-01-13 05:25:13 +00:00
Alexey Bataev 75db8c386d Rename target i386-linux-android to i686-linux-android
llvm-svn: 199073
2014-01-13 03:49:38 +00:00
Nico Weber 0e224700de Add help text for -MMD, -MD, -MM, -M, -MF.
Also regroup these flags so that alike flags are next to each other, while
keeping the list still mostly alphabetical.

The help text isn't ideal, but I feel it's less maze-like than
http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Preprocessor-Options.html (look
at the entry for '-MMD' and count how many other entries you need to look up
until you know what it does).

And it looks like -M / -MM are mostly an historical accident and most people
use -MD or -MMD for deps tracking these days, so make -M / -MM refer to
-MD / -MMD instead of the other way round.

llvm-svn: 199067
2014-01-12 23:12:35 +00:00
NAKAMURA Takumi 9b435fec0d DynamicASTMatchers/VariantValueTest.cpp: It works with msvcrt since setmode(stderr, O_BINARY) were removed.
llvm-svn: 199059
2014-01-12 17:49:26 +00:00
Alp Toker eee59685af Delete inaccurate doc comment - isVariadic is long gone
The canonical documentation in the header is up-to-date.

llvm-svn: 199054
2014-01-12 15:18:15 +00:00
Alp Toker 44e3905987 Clarify warn_cxx98_compat_attribute diagnostic
Various attribute flavours are supported in C++98. Make it clear that this
compatibility warning relates specifically to C++11-style generalized
attributes.

llvm-svn: 199053
2014-01-12 15:18:06 +00:00
Chandler Carruth 809403ff3f [PM] Update the creation of an IR printing pass to reflect the API
update in LLVM r199044.

llvm-svn: 199045
2014-01-12 11:31:22 +00:00
Chandler Carruth 0a50c49607 [PM] Update Clang to follow the header rename in LLVM r199041.
llvm-svn: 199042
2014-01-12 11:11:50 +00:00
Jakob Stoklund Olesen b81eb3eb51 SPARC passes non-trivial C++ objects indirectly like everybody else.
llvm-svn: 199037
2014-01-12 06:54:56 +00:00
Jakob Stoklund Olesen 8d7f5066bf MIPS and SPARC assemblers both take the -KPIC flag.
llvm-svn: 199034
2014-01-12 04:53:36 +00:00
Benjamin Kramer 06e0dadede test case hygiene.
llvm-svn: 199017
2014-01-11 21:22:35 +00:00
Benjamin Kramer 2210562249 Make helper function static.
llvm-svn: 199013
2014-01-11 18:42:35 +00:00
Jakob Stoklund Olesen 58801bf1dc Select the UltraSPARC instruction set when invoking the assembler.
llvm-svn: 199012
2014-01-11 18:25:01 +00:00
Nick Lewycky 7dae818117 Whoops! Fix major think-o in the first example in the documentation that I edited at 3am.
llvm-svn: 198997
2014-01-11 02:55:22 +00:00
Nick Lewycky 35a6ef4c35 Add a new attribute 'enable_if' which can be used to control overload resolution based on the values of the function arguments at the call site.
llvm-svn: 198996
2014-01-11 02:50:57 +00:00
Nick Lewycky 5641233047 Use the appropriate SourceLocation for the template backtrace when doing
template argument deduction.

llvm-svn: 198995
2014-01-11 02:37:12 +00:00
Richard Smith 454b4af0b0 PR12208: Under -fno-elide-constructors, don't forget to actually copy an NRVO
variable to the return slot. Patch by David Wiberg, with test case alterations
by me.

llvm-svn: 198991
2014-01-11 01:24:05 +00:00
Warren Hunt 9425891f28 [ms-abi] Change the way alignment is tracked
This patch more cleanly seperates the concepts of Preferred Alignment 
and Required Alignment.  Most notable that changes to Required Alignment 
do *not* impact preferred alignment until late in struct layout.  This 
is observable when using pragma pack and non-virtual bases and the use 
of tail padding when laying them out.

Test cases included.

llvm-svn: 198988
2014-01-11 01:16:40 +00:00
Richard Smith 6fa28ffd5a Fix "regression" caused by updating our notion of POD to better match the C++11
rules: instead of requiring flexible array members to be POD, require them to
be trivially-destructible. This seems to be the only constraint that actually
matters here (and even then, it's questionable whether this matters).

llvm-svn: 198983
2014-01-11 00:53:35 +00:00
Warren Hunt 87c2b0400d [ms-abi] Adjusting Rules for Padding Between Bases
The presence of a VBPtr suppresses the presence of zero sized 
sub-objects in the non-virtual portion of the object in the context of 
determining if two base objects need alias-avoidance padding placed 
between them.

Test cases included.

llvm-svn: 198975
2014-01-10 23:32:32 +00:00
Rafael Espindola 2a008784d3 Use the simpler version of llvm::sys::fs::remove when possible.
llvm-svn: 198957
2014-01-10 21:32:14 +00:00
Richard Smith c0a5d5bc4f Downgrade bogus ExtWarn on duplicate 'friend' specifier to a Warning, and add a
Warning for a duplicate 'constexpr' specifier.

llvm-svn: 198956
2014-01-10 21:27:55 +00:00
Jordan Rose 1a866cd54b [analyzer] Model getters of known-@synthesized Objective-C properties.
...by synthesizing their body to be "return self->_prop;", with an extra
nudge to RetainCountChecker to still treat the value as +0 if we have no
other information.

This doesn't handle weak properties, but that's mostly correct anyway,
since they can go to nil at any time. This also doesn't apply to properties
whose implementations we can't see, since they may not be backed by an
ivar at all. And finally, this doesn't handle properties of C++ class type,
because we can't invoke the copy constructor. (Sema has actually done this
work already, but the AST it synthesizes is one the analyzer doesn't quite
handle -- it has an rvalue DeclRefExpr.)

Modeling setters is likely to be more difficult (since it requires
handling strong/copy), but not impossible.

<rdar://problem/11956898>

llvm-svn: 198953
2014-01-10 20:06:06 +00:00
Fariborz Jahanian 26cb6d90b8 ObjectiveC. Remove warning on mismatched methods
which may belong to unrelated classes. It was
primarily intended for miuse of @selector expression.
But warning is too noisy and will be issued when
an actual @selector is used. // rdar://15740134

llvm-svn: 198952
2014-01-10 19:27:21 +00:00
Jakob Stoklund Olesen 0e38aade94 Implement -m32 and -m64 with llvm::Triple functions.
Don't repeat the 32 <-> 64 architecture mapping incompletely.

llvm-svn: 198943
2014-01-10 15:25:23 +00:00
Alp Toker 9f1d619c07 Remove unexpected code completion handling from ConsumeToken()
With this change tok::code_completion is finally handled exclusively as a
special token kind like other tokens that need special treatment.

All callers have been updated to use the specific token consumption methods and
the parser has a clear idea the current token isn't special by the time
ConsumeToken() gets called, so this has been unreachable for some time.

ConsumeAnyToken() behaviour is unchanged and will continue to support
unexpected code completion as part of the special token path.

This survived an amount of fuzzing and validation, but please ping the list if
you hit a code path that previously relied on the old unexpected handler and
now asserts.

llvm-svn: 198942
2014-01-10 14:37:02 +00:00
Kristof Beyls fb38729d78 Enable -fuse-init-array for all AArch64 ELF targets by default, not just linux.
llvm-svn: 198940
2014-01-10 13:44:34 +00:00
Rafael Espindola 26d0f7ce7d Use 'w' instead of 'c' to represent the win32 mangling.
This change was requested to avoid confusion if we ever support non windows
coff systems.

llvm-svn: 198939
2014-01-10 13:42:17 +00:00
Alp Toker b630b9d20a Update LangOpt descriptions
Based on recent discussions, attempt to provide a clearer distinction between
MicrosoftMode and MicrosoftExt. This still doesn't feel perfect but gives a
better idea which is which.

Also update the CPlusPlus11 description which got missed in r171367.

C++0x is dead, long live C++0x!

llvm-svn: 198936
2014-01-10 11:19:45 +00:00
Alp Toker 9765056178 TryConsume parser cleanups
Also move some comments into the block they were meant to describe.

llvm-svn: 198935
2014-01-10 11:19:30 +00:00
Daniel Jasper 4d7a97adfc clang-format: Slightly adapt line break in edge case.
Before:
  SomeMap[std::pair(aaaaaaaaaaaa, bbbbbbbbbbbbbbb)]
      .insert(ccccccccccccccccccccccc);

After:
  SomeMap[std::pair(aaaaaaaaaaaa, bbbbbbbbbbbbbbb)].insert(
      ccccccccccccccccccccccc);

This seems to be about 3:1 more common in Google and Chromium style and I found
only a handful of instances inside the LLVM codebase.

llvm-svn: 198924
2014-01-10 08:40:17 +00:00
Jakob Stoklund Olesen 73cb84c271 Use the right dynamic linker for SPARC Linux executables.
llvm-svn: 198923
2014-01-10 08:18:34 +00:00
Kostya Serebryany a6afef7a51 reapply r198858: Disable LeakSanitizer in TableGen binaries, see PR18325; this time LeakSanitizerIsTurnedOffForTheCurrentProcess is used instead of __lsan_is_turned_off
llvm-svn: 198922
2014-01-10 08:05:42 +00:00
Daniel Jasper b1c19f8987 clang-format: Understand ObjC boxed expressions.
Before:
  [dictionary setObject:@(1)forKey:@"number"];
After:
  [dictionary setObject:@(1) forKey:@"number"];

llvm-svn: 198920
2014-01-10 07:44:53 +00:00
Jakob Stoklund Olesen b3f938ee87 Locate GCC installations on SPARC systems.
llvm-svn: 198918
2014-01-10 06:53:02 +00:00
Richard Trieu c38786be00 Make the tautological out of range warning use Sema::DiagRuntimeBehavior so that
the warning will not trigger on code protected by compile time checks.

llvm-svn: 198913
2014-01-10 04:38:09 +00:00
Jakob Stoklund Olesen 91a8e03af0 Give the linker the right ELF type for SPARC targets.
llvm-svn: 198912
2014-01-10 03:51:33 +00:00
Jakob Stoklund Olesen 2490e553c0 Pass -32/-64 to the assembler when building for sparc/sparc64.
llvm-svn: 198911
2014-01-10 03:51:29 +00:00
Warren Hunt f4518def33 [ms-abi] Handle __declspec(align) on bitfields "properly"
__declspec(align), when applied to bitfields affects their perferred 
alignment instead of their required alignment.  We don't know why.  
Also, #pragma pack(n) turns packing *off* if n is greater than the 
pointer size.  This is now observable because of the impact of 
declspec(align) on bitfields.

llvm-svn: 198907
2014-01-10 01:28:05 +00:00
NAKAMURA Takumi ae6f9d4460 CGRecordLayoutBuilder.cpp: Clarify if-else. [-Wdangling-else]
llvm-svn: 198906
2014-01-10 00:54:50 +00:00
Fariborz Jahanian 65b1377911 ObjectiveC. 1) Warn when @dynamic (as well as synthesize)
property has the naming convention that implies 'ownership'.
2) improve on diagnostic and make it property specific.
3) fix the line number in the case of default property
synthesis. // rdar://15757510

llvm-svn: 198905
2014-01-10 00:53:48 +00:00
Richard Smith 7073a2da15 Reapply r198845, reverted in r198849, with a fix to make it valid C++98, not
just valid C++11 =)

Original commit message:

PR18427: Use an appropriately-aligned buffer in APValue, to avoid a crash on
SPARC, where uint64_t apparently requires higher alignment than void*.

llvm-svn: 198903
2014-01-10 00:40:45 +00:00
Warren Hunt 640015cbc3 [ms-abi] Fixing CGRecordLayoutBuilder w.r.t. MS NonVirutalBase Layout
The MS abi lays out *all* non-virtual bases with leading vfptrs before 
laying out non-virutal bases without vfptrs.  This guarantees that the 
primary base is laid out first.  r198818 fixed RecordLayoutBuilder to 
produce compatiable layouts.  This patch fixes CGRecordLayoutBuilder to 
be able to consume those layouts and produce meaningful output without 
tripping any asserts about assumed incoming layout.

A test case is included that shows CGRecordLayoutBuilder in fact 
produces output in the compatiable order.

llvm-svn: 198900
2014-01-09 23:51:31 +00:00
Aaron Ballman a4bb4b9f0b Updating documentation for the __has_attribute changes landed in r198897.
llvm-svn: 198899
2014-01-09 23:11:13 +00:00
Aaron Ballman 0fa06d879a __has_attribute now understands target-specific attributes. So when you ask whether an ARM target has the "interrupt" attribute, it will return true for ARM and MSP430 targets, and false for others.
llvm-svn: 198897
2014-01-09 22:57:44 +00:00
Aaron Ballman ab7691c4ce Removing the notion of TargetAttributesSema and replacing it with one where the parsed attributes are responsible for knowing their target-specific nature, instead of letting Sema figure it out. This is necessary so that __has_attribute can eventually determine whether a parsed attribute applies to the given target or not.
llvm-svn: 198896
2014-01-09 22:48:32 +00:00
Alp Toker 98571fd9b7 Fix ast-dump-color.cpp test following r198883
The commit added a source location that used to be missing from the AST.

llvm-svn: 198892
2014-01-09 21:43:39 +00:00
Rafael Espindola 3cc5c2df9b Use getPointerSizeInBits.
I introduced this bug in 198815. Thanks for Mark Lacey for noticing.
Unfortunately, I have no idea how to test this code.

llvm-svn: 198891
2014-01-09 21:32:51 +00:00
Ben Langmuir de04923344 Preserve -fretain-comments-from-system-headers in modules
Preserves the setting of -fretain-comments-from-system-headers when
building/saving/loading module files. This allows code completion to pick up
documentation comments from system modules.

llvm-svn: 198890
2014-01-09 20:53:49 +00:00