Commit Graph

59665 Commits

Author SHA1 Message Date
Richard Smith be9b6c75c3 [modules] For explicit module file dependencies, only list direct dependency module files.
llvm-svn: 244931
2015-08-13 18:30:25 +00:00
Yaron Keren 556b21aa10 Remove and forbid raw_svector_ostream::flush() calls.
After r244870 flush() will only compare two null pointers and return,
doing nothing but wasting run time. The call is not required any more
as the stream and its SmallString are always in sync.

Thanks to David Blaikie for reviewing.

llvm-svn: 244928
2015-08-13 18:12:56 +00:00
Richard Smith 1dbb95151b Fix wrong expected test output in r244923.
llvm-svn: 244927
2015-08-13 18:11:20 +00:00
Reid Kleckner 90fd1db21b Try to fix the build after r244923
llvm-svn: 244926
2015-08-13 18:10:34 +00:00
Reid Kleckner 7ec8ba44b5 Try to fix new.cpp after r244920 to make it pass
llvm-svn: 244925
2015-08-13 18:10:32 +00:00
Richard Smith 216a3bd70d [modules] Change the way we deal with .d output for explicitly-specified module
files: include the .pcm file itself in the .d output, rather than including its
own input files. Other forms of module file continue to be transparent for .d
output.

Arguably, the input files for the .pcm file are still inputs to the
compilation, but that's unnecessary for make-like build systems (where the
mtime of the .pcm file is sufficient) and harmful for smarter build systems
that know about module files and want to track only the local dependencies.

llvm-svn: 244923
2015-08-13 17:57:10 +00:00
Reid Kleckner 6cf4a6ba9b Turn off __has_feature(cxx_rtti) when -fno-rtti-data is present
-fno-rtti-data makes it so that vtables emitted in the current TU lack
RTTI data. This means that dynamic_cast usually fails at runtime. Users
of the existing cxx_rtti feature expect all of RTTI to work, not just
some of it.

Chromium bug for context: http://crbug.com/518191

llvm-svn: 244922
2015-08-13 17:56:49 +00:00
Ben Langmuir 41f81994fe Attempt to fix build after r244912
Some compilers were less happy about converting a lambda to a comparator
function for array_pod_sort.

llvm-svn: 244917
2015-08-13 17:30:07 +00:00
Ben Langmuir 7ff29148ac [Modules] Add Darwin-specific compatibility module map parsing hacks
This preserves backwards compatibility for two hacks in the Darwin
system module map files:

1. The use of 'requires excluded' to make headers non-modular, which
should really be mapped to 'textual' now that we have this feature.

2. Silently removes a bogus cplusplus requirement from IOKit.avc.

Once we start diagnosing missing requirements and headers on
auto-imports these would have broken compatibility with existing Darwin
SDKs.

llvm-svn: 244912
2015-08-13 17:13:33 +00:00
Martell Malone 1bc12bbea6 Driver: Fix include directories when not using libgcc under mingw
Summary:
When we want to use mingw-w64 and clang with compiler-rt we should not
need to have libgcc installed. This fixes finding includes when libgcc
is not installed

Reviewers: yaron.keren

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D11808

llvm-svn: 244902
2015-08-13 15:41:04 +00:00
Daniel Jasper 033181bcd2 clang-format: Inside decltype(), there is an expression.
Before:
  decltype(a* b) F();

After:
  decltype(a * b) F();

llvm-svn: 244891
2015-08-13 13:43:51 +00:00
Daniel Jasper 5eaa009e57 clang-format: Fix incorrect lambda-detection.
Before:
  [ a, a ]() -> a<1>{};

After:
  [a, a]() -> a<1> {};

llvm-svn: 244890
2015-08-13 13:37:08 +00:00
Yaron Keren a3668a3fcd Remove raw_svector_ostream::resync and users. It's no-op after r244870.
llvm-svn: 244888
2015-08-13 12:42:25 +00:00
Yaron Keren 2ed4060ab6 Remove superfluous private:, TypeCache is private by default.
llvm-svn: 244871
2015-08-13 07:12:03 +00:00
Yaron Keren b768f77ed6 Disable failing check in bots from r244867.
llvm-svn: 244869
2015-08-13 06:12:49 +00:00
Ivan Krasin 1193f2cbc0 Add sanitizer blacklists to the rules generated with -M/-MM/-MD/-MMD.
Summary:
Clang sanitizers, such as AddressSanitizer, ThreadSanitizer, MemorySanitizer,
Control Flow Integrity and others, use blacklists to specify which types / functions
should not be instrumented to avoid false positives or suppress known failures.

This change adds the blacklist filenames to the list of dependencies of the rules,
generated with -M/-MM/-MD/-MMD. This lets CMake/Ninja recognize that certain
C/C++/ObjC files need to be recompiled (if a blacklist is updated).

Reviewers: pcc

Subscribers: rsmith, honggyu.kim, pcc, cfe-commits

Differential Revision: http://reviews.llvm.org/D11968

llvm-svn: 244867
2015-08-13 04:04:37 +00:00
Rafael Espindola 817d962ef0 Update for llvm api change.
llvm-svn: 244855
2015-08-13 01:07:06 +00:00
Richard Smith 03a06dd13c Add SourceManager::dump() to dump the current set of SLocEntries.
llvm-svn: 244852
2015-08-13 00:45:11 +00:00
David Blaikie 7cb12c7489 Wdeprecated: LambdaScopeInfos need to be copied, so make the ScopeInfo hierarchy safely copyable
Making the base class's copy ctor protected and the derived classes
final to avoid any slicing-prone APIs.

llvm-svn: 244843
2015-08-12 23:59:02 +00:00
David Blaikie d7057d9e52 Wdeprecated: ApplyDebugLocation is returned by value yet if it is ever copied (rather than RVO'd) that would be broken, make it movable instead
llvm-svn: 244838
2015-08-12 23:49:57 +00:00
David Blaikie 01f4209631 Wdeprecated: CGBuilderInserter is copy constructed in some contexts - remove the unnecessarily disabling copy assignment to enable this
The object has very simple state, there seems no reason to disallow all
the usual value semantic operations.

llvm-svn: 244831
2015-08-12 23:16:55 +00:00
David Blaikie 737260662b -Wdeprecated: Job objects are stored in a vector yet are not really copyable, make them movable instead
llvm-svn: 244829
2015-08-12 23:09:24 +00:00
David Blaikie 8533e96e42 -Wdeprecated: SavedInstanceContext is returned by value but isn't really copyable, but it can be made movable
llvm-svn: 244826
2015-08-12 22:58:10 +00:00
Richard Smith 78d81ecfc3 [modules] If loading a .pcm file would cause us to run out of source locations, attempt to fail more gracefully. (No test; this requires >= 4GB of preprocessed input...)
llvm-svn: 244822
2015-08-12 22:25:24 +00:00
Naomi Musgrave 522168f7b8 Revert "Implement poisoning of only class members in dtor, as opposed to also poisoning fields inherited from base classes."
This reverts commit 8dbbf3578a9a5d063232b59e558e5fe46e2cd42c.
Rolled back due to buildbot failures on 'ninja check-clang'.

llvm-svn: 244820
2015-08-12 22:07:24 +00:00
Naomi Musgrave 9bd83fd465 Implement poisoning of only class members in dtor, as opposed to also poisoning fields inherited from base classes.
Verify emitted code for derived class with virtual destructor sanitizes its members only once.
Changed emission order for dtor callback, so only the last dtor for a class emits the sanitizing callback, while ensuring that class members are poisoned before base class destructors are invoked.
Skip poisoning of members, if class has no fields.
Removed patch file containing extraneous changes.

Summary: Poisoning applied to only class members, and before dtors for base class invoked

Reviewers: eugenis, kcc

Differential Revision: http://reviews.llvm.org/D11951

llvm-svn: 244819
2015-08-12 21:37:40 +00:00
Aaron Ballman 7596bcf726 Switching from an explicit loop to DeleteContainerSeconds; NFC.
llvm-svn: 244802
2015-08-12 20:05:18 +00:00
Hans Wennborg 32847fb7ab Docs: keep copyright years up-to-date
llvm-svn: 244797
2015-08-12 19:45:01 +00:00
Hans Wennborg 259b71a4d2 Options.td: Drop trailing space in -fsanitize= help text
llvm-svn: 244795
2015-08-12 19:35:05 +00:00
Hans Wennborg 0d08062b7b Docs: update clang-cl command-line documentation
llvm-svn: 244794
2015-08-12 19:35:01 +00:00
Aaron Ballman 001f168e94 RangRangify some more for loops; NFC.
llvm-svn: 244792
2015-08-12 19:00:39 +00:00
Douglas Katzman 15a63ed26e Don't compare getArchName() to "tce" as a string. NFC.
llvm-svn: 244791
2015-08-12 18:36:12 +00:00
Richard Trieu ecd36ee80b Stop printing macro backtraces that don't help diagnostics.
When displaying the macro backtrace, ignore some of the backtraces that do not
provide extra information to the diagnostic.  Typically, if the problem is
entirely contained within a macro argument, the macro expansion is often not
needed.  Also take into account SourceRange's attached to the diagnostic when
selecting which backtraces to ignore.  Two previous test cases have also been
updated.

Patch by Zhengkai Wu, with minor formatting fixes.

Differential Revision: http://reviews.llvm.org/D11778

llvm-svn: 244788
2015-08-12 18:24:59 +00:00
Hans Wennborg eb2bd9a269 ReleaseNotes: Small version nbr fix
llvm-svn: 244761
2015-08-12 16:40:42 +00:00
John Brawn 2106b7525c The alias.c test now requires arm-registered-target
This should fix a buildbot failure

llvm-svn: 244760
2015-08-12 15:55:55 +00:00
John Brawn 495008edde Add test for PR24379
The fix for this is in LLVM but it depends on how clang handles the alias
attribute, so add a test to the clang tests to make sure everything works
together as expected.

Differential Revision: http://reviews.llvm.org/D11980

llvm-svn: 244756
2015-08-12 15:15:27 +00:00
Aaron Ballman 3349f89974 The version of libxml2 required by c-index-test must be at least 2.5.3. Considering that this version was released in 2003, you might think the check a bit ridiculous. Unfortunately, GnuWin32 ships with libxml2 2.4.12, which was released in 2001.
This allows us to have GnuWin32 on the PATH on Windows without causing compilation errors.

llvm-svn: 244751
2015-08-12 15:01:15 +00:00
Aaron Ballman b226d3d0da Rangify some for loops; NFC.
llvm-svn: 244749
2015-08-12 13:38:59 +00:00
Alexey Bataev 4652e4baaf [OPENMP] Fix for http://llvm.org/PR24430: clang hangs on invalid input with openmp directive
Add parsing of openmp directives inside structs/unions in C mode.

llvm-svn: 244719
2015-08-12 07:10:54 +00:00
Saleem Abdulrasool 993b2864da libclang: Add period to typedef kind docblock
All of the other docblocks for the CXCursor_* cursor kind enum values
include documentation that ends with a period. Add a period to the end
of the CXCursor_TypedefDecl documentation to follow this convention.

Patch by Brian Gesiak!

llvm-svn: 244715
2015-08-12 03:21:44 +00:00
Richard Smith dd55b95fb2 [modules] Fix thread safety analysis to cope with merging of FieldDecls across modules.
llvm-svn: 244714
2015-08-12 02:17:52 +00:00
Piotr Padlewski 592b2cc246 Deleted old fixme ( ͡° ͜ʖ ͡°)
http://reviews.llvm.org/D11928

llvm-svn: 244706
2015-08-12 00:47:19 +00:00
Eric Christopher 83dfb00fd7 Untabify.
llvm-svn: 244695
2015-08-11 23:17:31 +00:00
Richard Smith 9c9173dcc8 [modules] When instantiating the contents of an imported CXXRecordDecl, we can
emit lexical contents for a declaration for another module. Track which module
those contents came from, and ensure that we only grab the lexical contents
from a single such instantiation.

llvm-svn: 244682
2015-08-11 22:00:24 +00:00
Petar Jovanovic 2e0551f8d2 [MIPS] Use arch values for lock-free atomic operations
Let NaClMips32ELTargetInfo inherit arch values for maximum width lock-free
atomic operations.

Differential Revision: http://reviews.llvm.org/D11949

llvm-svn: 244675
2015-08-11 21:27:39 +00:00
Anton Yartsev 8be92ef3a1 [analyzer] Incorrect env variable replaced.
llvm-svn: 244673
2015-08-11 21:24:19 +00:00
Richard Smith 2317a3e18e Add an assert to catch lexical decl deserialization bugs.
llvm-svn: 244671
2015-08-11 21:21:20 +00:00
Aaron Ballman 2e1f109c95 Fixing a few C++0x comments to be C++11; NFC.
llvm-svn: 244670
2015-08-11 21:17:53 +00:00
Aaron Ballman b2e2c57419 Add missing documentation for conversionDecl; NFC.
llvm-svn: 244669
2015-08-11 21:12:46 +00:00
Aaron Ballman 6f6d0b6c5a Add a polymorphic AST matcher for testing whether a constructor or a conversion declaration is marked as explicit or not.
llvm-svn: 244666
2015-08-11 21:09:52 +00:00
Aaron Ballman ed455d4062 Add an AST matcher to match member intializers of a CXXCtorInitializer.
llvm-svn: 244662
2015-08-11 20:42:00 +00:00
Daniel Jasper a804d1ec80 clang-format: Make SpaceBeforeParens work with overloaded operators.
Patch by Jon Chesterfield, thank you!

llvm-svn: 244660
2015-08-11 20:32:24 +00:00
David Majnemer f6ae8ae025 [MSVC Compatibility] Classify ext_ms_cast_fn_obj as DefaultError
This non-conforming extension was introduced to make it possible for us
to correctly compile <atomic> in VS 2013 and 2015.  Let's limit its
impact to system headers to encourage portable code.

llvm-svn: 244650
2015-08-11 19:25:13 +00:00
Daniel Jasper 3b0f87d289 Revert "[CUDA] Add implicit __attribute__((used)) to all __global__ functions."
This is breaking internal test. I'll provide a reproduction.

llvm-svn: 244583
2015-08-11 11:02:09 +00:00
Michael Wong b5c1698994 This patch fixes the assert in emitting captured code in the target data construct.
This is on behalf of Kelvin Li.
http://reviews.llvm.org/D11475

llvm-svn: 244569
2015-08-11 04:52:01 +00:00
Filipe Cabecinhas 7af183d841 Propagate SourceLocations through to get a Loc on float_cast_overflow
Summary:
float_cast_overflow is the only UBSan check without a source location attached.
This patch propagates SourceLocations where necessary to get them to the
EmitCheck() call.

Reviewers: rsmith, ABataev, rjmccall

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D11757

llvm-svn: 244568
2015-08-11 04:19:28 +00:00
David Majnemer ac73de9502 [MSVC Compat] Implement __is_destructible, __is_nothrow_destructible
Our implementations of these type trait intrinsics simply mapped them to
__has_trivial_destructor.  Instead, flesh these intrinsics out with a
full implementation which matches the standard's description.

llvm-svn: 244564
2015-08-11 03:03:28 +00:00
Tyler Nowicki 26cee3d929 Make the analysis reporting test with x86 to fix the hexagon build.
llvm-svn: 244561
2015-08-11 01:54:48 +00:00
Tyler Nowicki 65061a293b Print vectorization analysis when loop hint is specified.
This patche and a related llvm patch solve the problem of having to explicitly enable analysis when specifying a loop hint pragma to get the diagnostics. Passing AlwasyPrint as the pass name (see below) causes the front-end to print the diagnostic if the user has specified '-Rpass-analysis' without an '=<target-pass>’. Users of loop hints can pass that compiler option without having to specify the pass and they will get diagnostics for only those loops with loop hints.

llvm-svn: 244556
2015-08-11 01:10:08 +00:00
Richard Smith d61c1f8280 [modules] Don't suggest deleting the module cache on an error if there is no module cache for this build.
llvm-svn: 244547
2015-08-11 00:32:42 +00:00
Derek Schuff 33d60bfc0d add comment
llvm-svn: 244542
2015-08-11 00:19:54 +00:00
Derek Schuff 9cfd488443 Add NaCl to long double/fp128 mangling test
Summary:
NaCl is a platform where long double is the same as double.
Its mangling is spelled with "long double" but its ABI lowering is the same
as double.

Reviewers: rnk, chh

Subscribers: jfb, cfe-commits, dschuff

Differential Revision: http://reviews.llvm.org/D11922

llvm-svn: 244541
2015-08-11 00:19:53 +00:00
Richard Smith a24ff5545b [modules] Properly diagnose errors in module files for which we have no
corresponding include location (those specified on the command line).

llvm-svn: 244538
2015-08-11 00:05:21 +00:00
Richard Smith 629d8e6f18 Fix some tabs.
llvm-svn: 244537
2015-08-11 00:03:28 +00:00
Richard Smith 6d47d16ed6 Remove some dead code.
llvm-svn: 244530
2015-08-10 23:26:54 +00:00
Tyler Nowicki 034baf6154 Append options for vectorization when pointer checking threshold is exceeded.
Following one of the appended options will allow the loop to be vectorized. We do not include a command line option for modifying the pointer checking threshold because there is no clang-level interface for this currently.

llvm-svn: 244526
2015-08-10 23:05:16 +00:00
Derek Schuff 4044f6197a Add NaCl (a target where long double = double) to long double ABI test
A test was recently (r244468) added to cover long double calling convention
codegen, distinguishing between Android and GNU conventions (where long doubles
are fp128 and x86_fp80, respectively). Native Client is a target where long
doubles are the same as doubles. This change augments the test to cover
that case.

Also rename the test to test/codeGen/X86_64-longdouble.c

Differential Revision: http://reviews.llvm.org/D11921

llvm-svn: 244524
2015-08-10 23:02:37 +00:00
Tyler Nowicki 020dd79fb7 Make frontend floating-point commutivity test X86 specific to avoid cost-model related problems on arm-thumb and hexagon.
llvm-svn: 244517
2015-08-10 22:17:40 +00:00
Nick Lewycky 6ca07ca618 If a variable template is inside a context with template arguments that is being instantiated, and that instantiation fails, fail our instantiation instead of crashing. Errors have already been emitted.
llvm-svn: 244515
2015-08-10 21:54:08 +00:00
Tyler Nowicki 40e5d08a74 Remove non-ascii characters.
llvm-svn: 244506
2015-08-10 21:18:01 +00:00
Chih-Hung Hsieh 00b6f74935 Fix test case to work with -Asserts builds.
When clang is built with -DLLVM_ENABLE_ASSERTIONS=Off,
it does not create names for IR values.

Differential Revision: http://reviews.llvm.org/D11437

llvm-svn: 244502
2015-08-10 20:58:54 +00:00
Artem Belevich b7e4aab40c [CUDA] Add implicit __attribute__((used)) to all __global__ functions.
This allows emitting kernels that were instantiated from the host code
and which would never be explicitly referenced otherwise.

Differential Revision: http://reviews.llvm.org/D11666

llvm-svn: 244501
2015-08-10 20:57:02 +00:00
Artem Belevich 194ba60fe2 [CUDA] Added stubs for new attributes used by CUDA headers.
The main purpose is to avoid errors and warnings while parsing CUDA
header files. The attributes are currently unused otherwise.

Differential version: http://reviews.llvm.org/D11690

llvm-svn: 244497
2015-08-10 20:33:56 +00:00
Tyler Nowicki 8a0925cb62 Append options for floating-point commutivity when related diagnostics are produced.
With this patch clang appends the command line options that would allow vectorization when floating-point commutativity is required. Specifically those are enabling fast-math or specifying a loop hint. 

llvm-svn: 244492
2015-08-10 19:56:40 +00:00
Nick Lewycky 00a5d21803 Fix typo.
llvm-svn: 244490
2015-08-10 19:54:11 +00:00
Reid Kleckner c2e3ba48e3 [dllimport] A non-imported class with an imported key can't have a key
Summary:
The vtable takes its DLL storage class from the class, not the key
function. When they disagree, the vtable won't be exported by the DLL
that defines the key function. The easiest way to ensure that importers
of the class emit their own vtable is to say that the class has no key
function.

Reviewers: hans, majnemer

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D11913

llvm-svn: 244488
2015-08-10 19:39:01 +00:00
David Majnemer 3a4f95867f [clang-cl] Add support for CL and _CL_ environment variables
cl uses 'CL' and '_CL_' to prepend and append command line options to
the given argument vector.  There is an additional quirk whereby '#' is
transformed into '='.

Differential Revision: http://reviews.llvm.org/D11896

llvm-svn: 244473
2015-08-10 18:16:32 +00:00
Chih-Hung Hsieh 241a890bd7 Correct x86_64 fp128 calling convention
These changes are for Android x86_64 targets to be compatible
with current Android g++ and conform to AMD64 ABI.

https://llvm.org/bugs/show_bug.cgi?id=23897
  * Return type of long double (fp128) should be fp128, not x86_fp80.
  * Vararg of long double (fp128) could be in register and overflowed to memory.

https://llvm.org/bugs/show_bug.cgi?id=24111
  * Return value of long double (fp128) _Complex should be in memory like a structure of {fp128,fp128}.

Differential Revision: http://reviews.llvm.org/D11437

llvm-svn: 244468
2015-08-10 17:33:31 +00:00
Mark Heffernan 397a98d86d Add new llvm.loop.unroll.enable metadata for use with "#pragma unroll".
This change adds the new unroll metadata "llvm.loop.unroll.enable" which directs
the optimizer to unroll a loop fully if the trip count is known at compile time, and
unroll partially if the trip count is not known at compile time. This differs from
"llvm.loop.unroll.full" which explicitly does not unroll a loop if the trip count is not
known at compile time

With this change "#pragma unroll" generates "llvm.loop.unroll.enable" rather than
"llvm.loop.unroll.full" metadata. This changes the semantics of "#pragma unroll" slightly
to mean "unroll aggressively (fully or partially)" rather than "unroll fully or not at all".

The motivating example for this change was some internal code with a loop marked
with "#pragma unroll" which only sometimes had a compile-time trip count depending
on template magic. When the trip count was a compile-time constant, everything works
as expected and the loop is fully unrolled. However, when the trip count was not a
compile-time constant the "#pragma unroll" explicitly disabled unrolling of the loop(!).
Removing "#pragma unroll" caused the loop to be unrolled partially which was desirable
from a performance perspective.

llvm-svn: 244467
2015-08-10 17:29:39 +00:00
Roman Kashitsyn 291f64fd03 Add WebKit brace style configuration option.
Summary:
Add brace style `BS_WebKit` as described on https://www.webkit.org/coding/coding-style.html:

* Function definitions: place each brace on its own line.
* Other braces: place the open brace on the line preceding the code block; place the close brace on its own line.

Set brace style used in `getWebKitStyle()` to the newly added `BS_WebKit`.

Reviewers: djasper, klimek

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D11837

llvm-svn: 244446
2015-08-10 13:43:19 +00:00
John Brawn a7b4ec0a9c [Driver] Fix handling of -fbuiltin/-fcommon when combined with -mkernel
-mkernel enables -fno-builtin and -fno-common by default, but allows -fbuiltin
and -fcommon to override that. However "-fbuiltin -fno-builtin" is treated the
same as "-fbuiltin" which is wrong, so fix that. Also fixes similar behaviour
when -fno-common is default.

Differential Revision: http://reviews.llvm.org/D11459

llvm-svn: 244437
2015-08-10 11:11:28 +00:00
Daniel Marjamaki 30e2a44a06 [Static Analyzer] Warn when inner and outer conditions are identical. The inner condition is always true.
Reviewed in http://reviews.llvm.org/D10892.

llvm-svn: 244435
2015-08-10 07:18:29 +00:00
Filipe Cabecinhas 011e388d3c [tests] Remove calls to grep
llvm-svn: 244433
2015-08-10 07:01:11 +00:00
Alexey Bataev a93fb5b048 [MSVC] Crash fix: assigning of overloaded member function pointer caused assertion
Original class was not marked with inheritance attribute and it causes a crash on codegen.
Differential Revision: http://reviews.llvm.org/D11828

llvm-svn: 244428
2015-08-10 04:07:49 +00:00
NAKAMURA Takumi 4b81164810 clang/test/Modules: Satisfy win32 hosts due to dospath issue.
llvm-svn: 244427
2015-08-09 22:55:50 +00:00
Richard Smith 86cc82906f [modules] Remove now-dead code for lazy loading of files specified by -fmodule-file=.
llvm-svn: 244417
2015-08-09 08:58:36 +00:00
Richard Smith 0f99d6a441 [modules] PR22534: Load files specified by -fmodule-file= eagerly. In particular, this avoids the need to re-parse module map files when using such a module.
llvm-svn: 244416
2015-08-09 08:48:41 +00:00
Richard Smith 38c1e6d355 Unrevert r244412 (reverted in r244414), and delete the bogus line left behind
in the unit test that was checking a file the test no longer creates.

llvm-svn: 244415
2015-08-09 06:03:55 +00:00
Justin Bogner b102d1a432 Revert "[modules] Don't leak -M flags for dependency file generation into the module"
This was failing tests on a bunch of bots:

http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/29919/steps/check-all
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/29627/steps/check-all
http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/9959/
http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/5591/

This reverts r244412

llvm-svn: 244414
2015-08-09 05:40:38 +00:00
Richard Smith 2a6edb30d9 [modules] When building a dependency file, include module maps parsed in the
current compilation, not just those from imported modules.

llvm-svn: 244413
2015-08-09 04:46:57 +00:00
Richard Smith 2d7fbbc7be [modules] Don't leak -M flags for dependency file generation into the module
build process when we implicitly build a module. Previously, we'd create the
specified .d file once for each implicitly-built module and then finally
overwrite it with the correct contents after the requested build completes.
(This fails if you use stdout as a dependency file, which is what the provided
testcase does, and is how I discovered this brokenness.)

llvm-svn: 244412
2015-08-09 02:44:20 +00:00
Richard Smith 03f7e611c6 [modules] Attach dependency listeners to the module manager once when it's
created, rather than creating and attaching a new listener each time we load a
module file (yes, the old ones were kept around too!). No functionality change
intended, but a bit more sanity.

llvm-svn: 244411
2015-08-09 02:28:42 +00:00
Richard Smith d9a0e64f66 Add file missed from r244409.
llvm-svn: 244410
2015-08-09 01:50:14 +00:00
Richard Smith 2bb3c34ed4 [modules] When loading a template specialization, re-canonicalize its template
arguments because the reloaded form might have become non-canonical across the
serialization/deserialization step (this particularly happens when the
canonical form of the type involves an expression).

llvm-svn: 244409
2015-08-09 01:05:31 +00:00
Yaron Keren aa2813325f Teach mingw toolchain driver to properly emit static or dynamic linking of ligcc.
Implemented in MinGW::Linker::AddLibGCC since AddLibgcc is a logic puzzle even
before adding one more boolean. A first step towards simplification of AddLibgcc
would be to factor out the Android AddLibgcc code into its own routine.

llvm-svn: 244407
2015-08-09 00:24:07 +00:00
Ted Kremenek 0270a08ebf [Static Analyzer] Add --analyzer-target option to scan-build.
When interposing on a compiler doing cross-compilation, scan-build
does not infer the target triple needed to pass to clang for
doing static analysis.  The --analyzer-target option allows one
to manually specify the target triple used during static analysis
(and only static analysis) for such cases.

Patch by Honggyu Kim!

Reviewed in http://reviews.llvm.org/D10356.

llvm-svn: 244400
2015-08-08 17:58:47 +00:00
Anna Zaks 9592df7901 Revert "[analyzer] Add checkers for OS X / iOS localizability issues"
This reverts commit fc885033a30b6e30ccf82398ae7c30e646727b10.

Revert all localization checker commits until the proper fix is implemented.

llvm-svn: 244394
2015-08-08 04:53:04 +00:00
Anna Zaks 08f3c1e12a Revert "[analyzer] Fixup to r244389 to make this build on windows."
This reverts commit 57a46a75b408245cf4154a838fe13ad702065745.

Revert all localization checker commits until the proper fix is implemented.

llvm-svn: 244393
2015-08-08 04:52:59 +00:00
Anna Zaks 67c4df8313 [analyzer] Fixup to r244389 to make this build on windows.
llvm-svn: 244390
2015-08-08 02:26:07 +00:00
Anna Zaks 38b496a05d [analyzer] Add checkers for OS X / iOS localizability issues
Add checkers that detect code-level localizability issues for OS X / iOS:
 - A path sensitive checker that warns about uses of non-localized
 NSStrings passed to UI methods expecting localized strings.
 - A syntax checker that warns against not including a comment in
 NSLocalizedString macros.

A patch by Kulpreet Chilana!

llvm-svn: 244389
2015-08-08 01:49:26 +00:00