Commit Graph

137300 Commits

Author SHA1 Message Date
Craig Topper 61d045781a Add llvm.ceil, llvm.trunc, llvm.rint, llvm.nearbyint intrinsics.
llvm-svn: 168025
2012-11-15 06:51:10 +00:00
Nick Lewycky 5cc9ebb723 Revert r167567, restoring the ability of clang to run gcc in cases where it
can't handle the input file type. This resulted in PR14338.

llvm-svn: 168024
2012-11-15 05:36:36 +00:00
Richard Trieu 03c3a2f5bb Fix an off-by-one error by switching < to <= in -Wtautological-constant-out-of-range-compare and added test case.
llvm-svn: 168023
2012-11-15 03:43:50 +00:00
Daniel Jasper 0f9f019ff8 Do not use data recursion in ASTMatchFinder.
The matchers rely on the complete AST being traversed as shown by the new test cases.

llvm-svn: 168022
2012-11-15 03:29:05 +00:00
Andrew Trick 449eb3f3be Fix an obvious merge bug in -join-globalcopies (disabled).
Jakub Staszak spotted this in review. I don't notice these things
until I manually rerun benchmarks. But reducing unit tests is a very
high priority.

llvm-svn: 168021
2012-11-15 02:32:22 +00:00
Jordan Rose 90ba0218e2 [analyzer] Fix test case broken by previous commit.
llvm-svn: 168020
2012-11-15 02:17:09 +00:00
Jordan Rose 2d98b97e10 [analyzer] Make sure calls in synthesized functions have valid path locations.
We do this by using the "most recent" good location: if a synthesized
function 'A' calls another function 'B', the path notes for the call to 'B'
will be placed at the same location as the path note for calling 'A'.

Similarly, the call to 'A' will have a note saying "Entered call from...",
and now we just don't emit that (since the user doesn't have a body to look
at anyway).

Previously, we were doing this for the "Calling..." notes, but not for the
"Entered call from..." or "Returning to caller". This caused a crash when
the path entered and then exiting a call within a synthesized body.

<rdar://problem/12657843>

llvm-svn: 168019
2012-11-15 02:07:23 +00:00
Sean Callanan e0b23b5198 In cases where the Objective-C ivar symbols are stripped out,
expressions that refer to ivars will not work because Clang
emits IR that refers to them to get the ivar offsets. 
However, it is possible to search the runtime for these values.

I have added support for reading the relevant tables to the
Objective-C runtime, and extended ClangExpressionDeclMap to
query that information if and only if it doesn't find the symbols
in the binary.

Also added a testcase.

<rdar://problem/12628122>

llvm-svn: 168018
2012-11-15 02:02:04 +00:00
Argyrios Kyrtzidis a660ae4421 [PCH] Reading expressions from attributes should be done using ReadExpr(),
not ReadExpr().

Also add a test case making sure the thread safety attributes work as expected
when they come from a PCH.

Fixes rdar://12584141 & http://llvm.org/PR13982

llvm-svn: 168017
2012-11-15 01:31:39 +00:00
Eli Friedman 6745c3b732 Fix a trivial bool-related bug I spotted while skimming David Fang's
current list of powerpc-darwin8 failures.

llvm-svn: 168016
2012-11-15 01:21:59 +00:00
Tanya Lattner b634bc91b4 Add link to cfe-users mailing list.
llvm-svn: 168015
2012-11-15 01:13:31 +00:00
Eric Christopher 456c08d69d Add some release notes that say we removed the CellSPU port.
llvm-svn: 168014
2012-11-15 00:59:52 +00:00
NAKAMURA Takumi 00d2a107fb InstCombineAndOrXor.cpp: Escape bracket in doxygen description. [-Wdocumentation]
llvm-svn: 168013
2012-11-15 00:35:50 +00:00
Richard Smith af41696bc4 Per [basic.lookup.classref]p3, in an expression of the form p->~type-name, the
type-name is looked up in the context of the complete postfix-expression. Don't
forget to pass the scope into this lookup when the type-name is a template-id;
it might name an alias template which can't be found within the class itself.

Bug spotted by Johannes Schaub on #llvm.

llvm-svn: 168011
2012-11-15 00:31:27 +00:00
Eli Friedman 37feb2d6a6 Fix DiagnoseBitwisePrecedence so it doesn't cast "-1" to the type
BinaryOperator::Opcode.  This is bad form, and the behavior of the static_cast
in this case is unspecified according to the standard.

Fixes a warning that showed up from r167992 on self-host.

llvm-svn: 168010
2012-11-15 00:29:07 +00:00
Jakub Staszak ab83a91709 Use LLVM_DELETED_FUNCTION.
llvm-svn: 168009
2012-11-15 00:25:36 +00:00
Owen Anderson 1aa2751260 Add doInitialization and doFinalization methods to ModulePass's, to allow them to be re-initialized and reused on multiple Module's.
Patch by Pedro Artigas.

llvm-svn: 168008
2012-11-15 00:14:15 +00:00
Fariborz Jahanian a4ca19694e objective-C blocks: make cc1 flag -encode-extended-block-signature
the default. // rdar://12109031

llvm-svn: 168007
2012-11-15 00:01:28 +00:00
Jakub Staszak f33e0f95b0 Remove unneeded #includes.
llvm-svn: 168006
2012-11-14 23:58:57 +00:00
Eli Friedman c2c982c78b Make template diffing handle integral expressions of various widths correctly.
PR14342.

llvm-svn: 168005
2012-11-14 23:57:08 +00:00
Richard Smith 0b50cb79ad Add -cc1 option -fno-diagnostics-use-presumed-location, a handy mode for
working with preprocessed testcases. This causes source locations in
diagnostics to point at the spelling location instead of the presumed location,
while still keeping the semantic effects of the line directives (entering and
leaving system-header mode, primarily).

llvm-svn: 168004
2012-11-14 23:55:25 +00:00
Argyrios Kyrtzidis a19a126ee3 [utils/ClangDataFormat.py] Add data formatter for StringRef.
llvm-svn: 168003
2012-11-14 23:52:19 +00:00
Argyrios Kyrtzidis a3caaf3a05 [utils/ClangDataFormat.py] In the summary of SourceLocation, include whether it is
local or loaded.

llvm-svn: 168002
2012-11-14 23:52:11 +00:00
NAKAMURA Takumi 5bbe0e18e9 NVPTXISelLowering.cpp: Fix warnings. [-Wunused-variable]
llvm-svn: 168001
2012-11-14 23:46:15 +00:00
Enrico Granata e78fe11b6c <rdar://problem/12408181> Test case to make sure this area of ObjC support does not regress in the future
llvm-svn: 168000
2012-11-14 23:45:48 +00:00
Bill Schmidt 451499f02d This patch is in preparation for adding medium code model support to the
PPC64 target.  The five tests modified herein test code generation that is
sensitive to the code model selected.  So I've added -code-model=small to
the RUN commands for each.

Since small code model is the default, this has no effect for now; but this
prepares us for eventually changing the default to medium code model for PPC64.

Test changes verified with small and medium code model as default on
powerpc64-unknown-linux-gnu.  All tests continue to pass.

llvm-svn: 167999
2012-11-14 23:23:27 +00:00
Sean Silva 905a2d3d17 docs: Improve typographical correctness.
llvm-svn: 167998
2012-11-14 23:15:51 +00:00
Fariborz Jahanian 64223e6db1 objective-C blocks: under cc1 flag -encode-extended-block-signature,
generate expanded signature encoding to include types as we
already do this for protocol method lists.
// rdar://12109031

llvm-svn: 167997
2012-11-14 23:11:38 +00:00
Sean Silva e0db519ae9 docs: Sphinxify TestSuiteMakefileGuide
Some small related fixups to TestingGuide too.

llvm-svn: 167996
2012-11-14 23:11:10 +00:00
Jordan Rose 27d126f97b [analyzer] Fix test in previous commit.
llvm-svn: 167995
2012-11-14 23:09:52 +00:00
Jordan Rose 5a29f3c05e [analyzer] Add a test case for printing a path note at a PreStmt point.
This is also a false-positive test case for <rdar://problem/12415065>.

<rdar://problem/12687586>

llvm-svn: 167994
2012-11-14 23:03:55 +00:00
Richard Trieu 560910c9b8 Improve -Wtautological-constant-out-of-range-compare by taking into account
type conversion between integers.  This allows the warning to be more accurate.

Also, turned the warning off in an analyzer test.  The relavent test cases
are covered by the tests in Sema.

llvm-svn: 167992
2012-11-14 22:50:24 +00:00
Jakub Staszak ab0139cb90 Use reserve() to avoid vector reallocation.
llvm-svn: 167991
2012-11-14 22:42:17 +00:00
Douglas Gregor 91155087e9 Teach the AST importer to merge enumerator constants. Fixes
<rdar://problem/12676166>, and tested on the LLDB side of the world.

llvm-svn: 167990
2012-11-14 22:29:20 +00:00
Jakub Staszak 62fc067518 Make sure to not get AVX code on an AVX-capable host. Revealed in r167967.
llvm-svn: 167989
2012-11-14 22:24:01 +00:00
NAKAMURA Takumi a54c14a922 test/CodeGen/Hexagon/postinc-load.ll: Suppress it for now. It triggered the failure on i686 hosts.
llvm-svn: 167988
2012-11-14 22:22:37 +00:00
Eric Christopher e373e82a5b Few more small CellSPU removals.
llvm-svn: 167987
2012-11-14 22:13:56 +00:00
Eric Christopher aa3d19e782 Fix CMake build.
llvm-svn: 167986
2012-11-14 22:10:47 +00:00
Eli Friedman 1f576831c9 When evaluating variably modified types for function parameters, dig out the
type as written from the ParmVarDecl; it's unclear whether the standard
(C99 6.9.1p10) requires this, but we're following the precedent set by gcc,
and hopefully nobody will ever ask about this again.

PR9559 / <rdar://problem/12621983>.

llvm-svn: 167985
2012-11-14 22:09:59 +00:00
Eric Christopher 950d8703b1 Remove the CellSPU port.
Approved by Chris Lattner.

llvm-svn: 167984
2012-11-14 22:09:20 +00:00
Eric Christopher fd081ca50a Remove the cellspu port.
Approved by Chris Lattner.

llvm-svn: 167983
2012-11-14 22:08:59 +00:00
NAKAMURA Takumi 3ea400bd4a ParseTemplate.cpp: Prune obsolete descriptions in ParseSingleDeclarationAfterTemplate(), for now. [-Wdocumentation]
/// \param TemplateParams if non-NULL, the template parameter lists
/// that preceded this declaration. In this case, the declaration is a
/// template declaration, out-of-line definition of a template, or an
/// explicit template specialization. When NULL, the declaration is an
/// explicit template instantiation.
///
/// \param TemplateLoc when TemplateParams is NULL, the location of
/// the 'template' keyword that indicates that we have an explicit
/// template instantiation.

llvm-svn: 167982
2012-11-14 21:45:43 +00:00
Anna Zaks 9821e57c09 [analyzer] Ensure that CmpRuns recursively walks the output directory.
llvm-svn: 167981
2012-11-14 21:32:16 +00:00
Howard Hinnant b5c63a2e07 Restrict optimized __pad_and_output implementation detail to desired releases.
llvm-svn: 167980
2012-11-14 21:17:15 +00:00
Sean Silva a89edf6a61 docs: Sphinxify TestingGuide
llvm-svn: 167979
2012-11-14 21:09:30 +00:00
Alexander Kornienko 92987fb311 Support for [[@LINE]], [[@LINE+<offset>]], [[@LINE-<offset>]] expressions in
FileCheck.

llvm-svn: 167978
2012-11-14 21:07:37 +00:00
Jakub Staszak d17df318c0 Fix invalid asserts, use llvm_unreachable instead.
llvm-svn: 167976
2012-11-14 21:03:40 +00:00
NAKAMURA Takumi 902b137133 llvm/test/CodeGen/X86/memset.ll: FileCheck-ize, and add another case on +avx.
llvm-svn: 167975
2012-11-14 21:01:40 +00:00
Jyotsna Verma 6649360860 Added multiclass for post-increment load instructions.
llvm-svn: 167974
2012-11-14 20:38:48 +00:00
Benjamin Kramer d71fb86aed Force CPU in test so we don't accidentally get AVX code on an AVX-capable host.
llvm-svn: 167973
2012-11-14 20:31:42 +00:00