Commit Graph

125349 Commits

Author SHA1 Message Date
Hongbin Zheng b21b865fe8 LoopUnrollPass: Use variable "Threshold" instead of "CurrentThreshold" when
reducing unroll count, otherwise the reduced unroll count is not taking
  the "OptimizeForSize" attribute into account.

llvm-svn: 154007
2012-04-04 11:44:08 +00:00
Alexey Samsonov 61a331d594 [ASan] use correct C-version of strchr on Windows
llvm-svn: 154006
2012-04-04 11:36:47 +00:00
Benjamin Kramer ab90ebe917 Don't actually execute gcc during testing.
llvm-svn: 154005
2012-04-04 09:05:21 +00:00
Benjamin Kramer a1355d17ca Move yaml::Stream's dtor out of line so it can see Scanner's dtor.
llvm-svn: 154004
2012-04-04 08:53:34 +00:00
Benjamin Kramer e43bde73aa Implement DwarfLLVMRegPair::operator< without violating asymmetry.
MSVC8 verifies this.

llvm-svn: 154002
2012-04-04 08:24:08 +00:00
Bob Wilson 5b6411591c Add a testcase for svn r153854.
llvm-svn: 154001
2012-04-04 07:06:30 +00:00
Richard Smith 25ec9d6b38 Fix diagnostic typos: "non-template arguments" vs "non-type template arguments".
No test updates: we don't appear to have any test coverage for these diagnostics!

llvm-svn: 154000
2012-04-04 06:47:16 +00:00
Richard Smith f016bbcc61 For PR11916: Add support for g++'s __int128 keyword. Unlike __int128_t, this is
a type specifier and can be combined with unsigned. This allows libstdc++4.7 to
be used with clang in c++98 mode.

Several other changes are still required for libstdc++4.7 to work with clang in
c++11 mode.

llvm-svn: 153999
2012-04-04 06:24:32 +00:00
Douglas Gregor 0e60cd78cc When performing template argument deduction for an initializer list,
be sure to perform the argument type adjustments in
[temp.deduct.call]p2, e.g., array decay.

And, when performing these deductions in the context of 'auto', make
sure that we're deducing the P' in std::initializer_list<P'> rather
than the whole initializer list.

Together, this makes code like

  for( auto s : {"Deferred", "New", "Open", "Review"}) { }

work properly.

llvm-svn: 153998
2012-04-04 05:10:53 +00:00
Craig Topper 34487838bf Convert assert(false) followed by a return to llvm_unreachable
llvm-svn: 153997
2012-04-04 04:55:46 +00:00
Craig Topper 4c7d995029 Remove default case from switch that was already covering all cases.
llvm-svn: 153996
2012-04-04 04:42:42 +00:00
Douglas Gregor bf13895a4b Dependent-sequence initialization of a single element can be direct
list-initialization. Loosen an over-eager assertion to fix PR12453.

llvm-svn: 153995
2012-04-04 04:06:51 +00:00
Argyrios Kyrtzidis 4a1049c8a2 [preprocessor] In Preprocessor::CachingLex() check whether there were more tokens
cached during the non-cached lex, otherwise we are going to drop them.

Fixes a bogus "_Pragma takes a parenthesized string literal" error when
expanding consecutive _Pragmas in a macro argument.

Part of rdar://11168596

llvm-svn: 153994
2012-04-04 02:57:01 +00:00
John McCall b73bc9af60 When computing the conversion sequence in overload resolution
for converting an empty list to a scalar, be sure to initialize
the source and destination types so that comparison of conversion
sequences will work in case there are multiple viable candidates.

llvm-svn: 153993
2012-04-04 02:40:27 +00:00
Nick Lewycky a995a47e38 If something already instantiated is reinstantiated as an explicit definition,
keep the latter.

No test. This was noticed when poking around something else with GDB. I'm not
able to figure out a testcase that would break due to this bug. Sorry.

llvm-svn: 153992
2012-04-04 02:38:36 +00:00
John McCall 152c9919e9 ErrorUnsupported on array cookies in the MS C++ ABI code;
patch by Timur Iskhodzhanov.

llvm-svn: 153990
2012-04-04 01:33:45 +00:00
John McCall 3abee49d1c Enter an expression evaluation context when parsing
statement-expressions.  Prevents cleanups and such from being
claimed by the first full-expression in the block.

llvm-svn: 153989
2012-04-04 01:27:53 +00:00
Ted Kremenek 34b4546c06 Fix dead store warning.
llvm-svn: 153988
2012-04-04 00:55:33 +00:00
Ted Kremenek 56458cab04 Change BugReporter's usage of IsCachedDiagnostic to only impact pruning diagnostics emitted to the
console, and leave it up to PathDiagnosticConsumer to unique reports with the shortest path.

llvm-svn: 153987
2012-04-04 00:55:29 +00:00
Ted Kremenek 669669f8d3 Silence dead store warning, and fix indentation.
llvm-svn: 153986
2012-04-04 00:55:25 +00:00
Ted Kremenek e69340c42c Remove dead assignment to local variable.
llvm-svn: 153985
2012-04-04 00:55:21 +00:00
Pete Cooper e7bff68a5e Removed useless switch for default case when switch was covering all the enum values
llvm-svn: 153984
2012-04-04 00:53:04 +00:00
Douglas Gregor 9781893507 Add feature check "cxx_local_type_template_args" describing support
for templates with local template arguments, from Michel Morin! Fixes
PR12337.

llvm-svn: 153983
2012-04-04 00:48:39 +00:00
Douglas Gregor 6a37784a35 Eliminate obvious use-after-free. Fixes PR12433 / <rdar://problem/11168333>.
llvm-svn: 153982
2012-04-04 00:34:49 +00:00
Howard Hinnant 7e5b4c9328 Put std::piecewise_construct_t back into the dylib for ABI stability. When clients are in C++11/constexpr mode this will be safely ignored because piecewise_construct is then declared with internal linkage.
llvm-svn: 153981
2012-04-03 23:45:46 +00:00
Bob Wilson 3e66d73259 Fix the install location for the Embedded makefile target.
svn r145378 inadvertently changed the destination for the Embedded target
in the makefile.  Add a "/Developer" suffix to DSTROOT to compensate.

llvm-svn: 153980
2012-04-03 23:44:39 +00:00
Michael J. Spencer afc0d6a36f Sorry about that. MSVC seems to accept just about any random string you give it ;/
llvm-svn: 153979
2012-04-03 23:36:44 +00:00
Bob Wilson 9d12ffcd71 Remove dead code for installing libLTO when building llvmCore.
llvm-svn: 153978
2012-04-03 23:13:26 +00:00
Michael J. Spencer 22120c47a7 Add YAML parser to Support.
llvm-svn: 153977
2012-04-03 23:09:22 +00:00
Pete Cooper 9511ec86f9 Add VSELECT to LegalizeVectorTypes::ScalariseVectorResult. Previously it would crash if it encountered a 1 element VSELECT. Solution is slightly more complicated than just creating a SELET as we have to mask or sign extend the vector condition if it had different boolean contents from the scalar condition. Fixes <rdar://problem/11178095>
llvm-svn: 153976
2012-04-03 22:57:55 +00:00
Pete Cooper b98934cf72 Removed one last bad continue statement meant to be removed in r153914.
llvm-svn: 153975
2012-04-03 22:18:49 +00:00
Bob Wilson 8bbd98df00 When building llvmCore, pass the SDKROOT and -arch setting to configure.
So far all of configure tests have been run against the default SDK and
architecture, regardless of what is actually being built.  We've gotten
lucky until now.  <rdar://problem/11112479>

llvm-svn: 153972
2012-04-03 21:50:26 +00:00
Bob Wilson 5512ec8bae Remove a reference to the C backend.
llvm-svn: 153971
2012-04-03 21:50:24 +00:00
Nick Lewycky c392148414 Remove more redundant lookups. Add a new "all_lookups_iterator" which provides
a view over the contents of a DeclContext without exposing the implementation
details of the StoredDeclsMap. Use this in LookupVisibleDecls to find the
visible declarations. Fixes PR12339!

llvm-svn: 153970
2012-04-03 21:44:08 +00:00
Greg Clayton 3c2c4bb2ce Added a platform agnostic symbolication python module that can be used by any targets. Then modified the darwin "crashlog.py" to use this agnostic info and the new functionality and classes.
llvm-svn: 153969
2012-04-03 21:35:43 +00:00
Howard Hinnant b2e9f19caf constexpr support for <utility>. Patch contributed by Jonathan Sauer.
llvm-svn: 153968
2012-04-03 21:09:48 +00:00
Nick Lewycky 13668f2083 Don't treat synthesized ivars as being in the base class for the purpose of
looking up visible decls.

llvm-svn: 153967
2012-04-03 20:26:45 +00:00
Chad Rosier 2a02fe1bb2 Fix an issue in SimplifySetCC() specific to vector comparisons.
When folding X == X we need to check getBooleanContents() to determine if the
result is a vector of ones or a vector of negative ones. 

I tried creating a test case, but the problem seems to only be exposed on a
much older version of clang (around r144500).
rdar://10923049

llvm-svn: 153966
2012-04-03 20:11:24 +00:00
Anton Korobeynikov d0b458d694 Set soname for FreeBSD as well.
Patch by Bernard Cafarelli!

llvm-svn: 153965
2012-04-03 19:48:31 +00:00
Michael J. Spencer 765792d5d1 Remove trailing whitespace.
llvm-svn: 153964
2012-04-03 18:40:27 +00:00
Michael J. Spencer e6203a57b5 Steal LLVM.h from Clang. This brings in very commonly used LLVM ADT/Support
types into the lld namespace.

llvm-svn: 153963
2012-04-03 18:39:40 +00:00
Kaelyn Uhrain f4657d5bd7 Replace the workaround from r153445 with a proper fix.
Infinite recursion was happening when DiagnoseInvalidRedeclaration
called ActOnFunctionDeclarator to check if a typo correction works when
the correction was just to the nested-name-specifier because the wrong
DeclContext was being passed in. Unlike a number of functions
surrounding typo correction, the DeclContext passed in for a function is
the context of the function name after applying any nested name
specifiers, not the lexical DeclContext where the
function+nested-name-specifier appears.

llvm-svn: 153962
2012-04-03 18:20:11 +00:00
Eric Christopher b81e2b403c Fix thinko check for number of operands to be the one that actually
might have more than 19 operands. Add a testcase to make sure I
never screw that up again.

Part of rdar://11026482

llvm-svn: 153961
2012-04-03 17:55:42 +00:00
Fariborz Jahanian 08ed8921c7 modern objective-c translator: rewriter linkage spec.
// rdar://11169733

llvm-svn: 153960
2012-04-03 17:35:38 +00:00
Argyrios Kyrtzidis f1b64c6198 Correct handling of _Pragma macro inside a macro argument.
If we are pre-expanding a macro argument don't actually "activate"
the pragma at that point, activate the pragma whenever we encounter
it again in the token stream.
This ensures that we will activate it in the correct location
or that we will ignore it if it never enters the token stream, e.g:

     \#define EMPTY(x)
     \#define INACTIVE(x) EMPTY(x)
     INACTIVE(_Pragma("clang diagnostic ignored \"-Wconversion\""))

This also fixes the crash in rdar://11168596.

llvm-svn: 153959
2012-04-03 16:47:40 +00:00
Lang Hames ffa52d2ae2 Matrix simplification in PBQP may push infinite costs onto register options.
The colorability heuristic should count these as denied registers.

No test case - this exposed a bug on an out-of-tree target.

llvm-svn: 153958
2012-04-03 16:27:16 +00:00
Dylan Noblesmith 7a3973d3e0 ARMDisassembler: drop bogus dependency on ARMCodeGen
And indirectly, a dependency on most of the core LLVM optimization
libraries.

llvm-svn: 153957
2012-04-03 15:48:14 +00:00
Dylan Noblesmith 6338485d59 Object: drop bogus VMCore dependency
llvm-svn: 153956
2012-04-03 15:48:10 +00:00
Howard Hinnant 6e3e78acba Updated documentation contributed by Christopher Jefferson.
llvm-svn: 153955
2012-04-03 15:08:42 +00:00
Tobias Grosser 8239a4cadf CodeGen: Remove unused declaration
llvm-svn: 153954
2012-04-03 12:37:14 +00:00