Commit Graph

167863 Commits

Author SHA1 Message Date
Saleem Abdulrasool 87a7fda237 clang: forward -no-integrated-as from the driver
Forward the -no-integrated-as option to -cc1 rather than simply invoking the
appropriate tool.  This is useful since this option has been overloaded to
permit disabling of parsing inline assembly at the MC layer.

llvm-svn: 201952
2014-02-22 21:50:09 +00:00
Benjamin Kramer d20d1adfb8 Make test more resilient against scheduling decisions.
Should bring the atom buildbots back to life.

llvm-svn: 201951
2014-02-22 20:14:02 +00:00
Nico Rieck 6047866232 Reorganize and improve semantic tests for dllexport/import
llvm-svn: 201947
2014-02-22 19:47:30 +00:00
Manman Ren 28671403bf Fix typo
llvm-svn: 201944
2014-02-22 19:31:28 +00:00
Aaron Ballman 19c02d29f5 Adding manual headings to the new capability attributes' documentation.
llvm-svn: 201942
2014-02-22 19:04:55 +00:00
Aaron Ballman 7c19ab17c7 Exposing the noduplicate attribute within Clang, which marks functions so that the optimizer does not duplicate code.
Patch thanks to Marcello Maggioni!

llvm-svn: 201941
2014-02-22 16:59:24 +00:00
Nico Rieck 9d2c15eff7 MC: Support COFF string tables larger than 10MB
Offsets past the range of single-slash encoding are encoded as base64,
padded to 6 characters, and prefixed with two slashes. This encoding is
undocumented but used by MSVC.

llvm-svn: 201940
2014-02-22 16:12:20 +00:00
Logan Chien dbed91ecb6 Don't inline get[S|U]LEB128Size() until they are proved to be hot.
llvm-svn: 201939
2014-02-22 15:39:39 +00:00
Marshall Clow 31be78b27d Fix historical #ifdef. Use __cplusplus instead of __GXX_EXPERIMENTAL_CXX0X__ when compiling with clang. No functionality change. Noteto self: It is important to run the regression tests on the copy of the code that you've changed.
llvm-svn: 201938
2014-02-22 15:13:48 +00:00
Logan Chien 5b776b72f6 Move get[S|U]LEB128Size() to LEB128.h.
This commit moves getSLEB128Size() and getULEB128Size() from
MCAsmInfo to LEB128.h and removes some copy-and-paste code.

Besides, this commit also adds some unit tests for the LEB128
functions.

llvm-svn: 201937
2014-02-22 14:00:39 +00:00
Rafael Espindola 478873ce46 Revert "Revert "Use relative rpath so that the installation and build dirs are relocatable.""
This reverts commit r201934.

Polly has been fixed to work with this.

llvm-svn: 201936
2014-02-22 13:29:31 +00:00
Rafael Espindola fa0841c78f Set CMAKE_INSTALL_RPATH_USE_LINK_PATH to true.
This will make sure polly finds libisl.so at runtime even if the parent
CMakeLists.txt sets CMAKE_INSTALL_RPATH.

llvm-svn: 201935
2014-02-22 13:28:31 +00:00
Rafael Espindola ac488fcb42 Revert "Use relative rpath so that the installation and build dirs are relocatable."
This reverts commit r201921.

This should bring the polly bots back. I will try to build it locally to
understand how cmake was setting the rpath of LLVMPolly.so.

llvm-svn: 201934
2014-02-22 12:36:28 +00:00
Logan Chien 496636ca6c Add const to some member functions of SuccIterator.
The operator+() and operator-() do not change the member
variables of SuccIterator.  This CL will qualify the *this*
pointer with const.

llvm-svn: 201933
2014-02-22 09:06:55 +00:00
NAKAMURA Takumi 2af1a44892 Prune debug message in AddLLVM.cmake.
llvm-svn: 201932
2014-02-22 07:31:10 +00:00
NAKAMURA Takumi 0607c15435 llvm/test/CodeGen/X86/shift-pcmp.ll: Tweak to appease FileCheck. "CHECK-LABEL" doesn't identify labels magically and CHECK-LABEL behaves free from other contexts.
For targeting pecoff, ".def foo" appears before ".short 32".

          .def    foo;
  ...
  .LCPI0_0:
          .short  32
  foo:

CHECK-LABEL seeks not from ".short 32" but from the top of the input.

llvm-svn: 201931
2014-02-22 07:27:04 +00:00
Logan Chien 61c6df0384 Include <cctype> for isdigit().
llvm-svn: 201930
2014-02-22 06:34:10 +00:00
Michael Gottesman 29ef6b0aca [python-bindings] Added OpCode like support for all enumerations with unittests.
Also fixed some trailing whitespace issues.

llvm-svn: 201929
2014-02-22 05:39:35 +00:00
Ed Maste 9cd270e26e Stop skipping test on FreeBSD that no longer fails
llvm.org/pr17232

llvm-svn: 201928
2014-02-22 03:13:12 +00:00
Peter Collingbourne fa1d4e1067 Do not add enums to prototype scope in C++ modes.
The language forbids defining enums in prototypes, so this check is normally
redundant, but if an enum is defined during template instantiation it should
not be added to the prototype scope.

While at it, clean up the code that deals with tag definitions in prototype
scope and expand the visibility warning to cover the case where an anonymous
enum is defined.

Differential Revision: http://llvm-reviews.chandlerc.com/D2742

llvm-svn: 201927
2014-02-22 03:05:49 +00:00
Peter Collingbourne b8d17e7a3b Correctly set brace range for CXXConstructExprs formed by list initialization.
Differential Revision: http://llvm-reviews.chandlerc.com/D2711

llvm-svn: 201926
2014-02-22 02:59:41 +00:00
Sebastian Pop bfec361cae GMP is only required for CLooG
llvm-svn: 201925
2014-02-22 02:15:39 +00:00
Quentin Colombet 1627a4159e [CodeGenPrepare] Fix the check of the legality of an instruction.
The API expects an ISD opcode, not an IR opcode.
Fixes a regression for R600.

Related to <rdar://problem/15519855>.

llvm-svn: 201923
2014-02-22 01:06:41 +00:00
Ted Kremenek 438f8db6d5 Per feedback from Aaron Ballman, push cast-to-ObjCProtocolDecl inside handleObjCSuppresProtocolAttr().
llvm-svn: 201922
2014-02-22 01:06:05 +00:00
Rafael Espindola 03bb9e183a Use relative rpath so that the installation and build dirs are relocatable.
This works by asking cmake to use the "install rpath", but setting that rpath
to be relative.

Thanks a lot to Brad King for the help with CMake!

llvm-svn: 201921
2014-02-22 00:54:14 +00:00
Warren Hunt 0dc28ea301 [_mm_prefetch] Returning previously deleted comment.
No functional change.  It's unclear if the word FIXME is relevant given 
that the macro behaves as intended.

llvm-svn: 201920
2014-02-22 00:47:24 +00:00
Ben Langmuir 090995122d Silence a warning from r201905
Avoid a warning about reaching the end of a non-void function after a
covered switch.

llvm-svn: 201919
2014-02-22 00:44:02 +00:00
David Majnemer 7a72601099 IRGen: Fix build breakage
MSVC allows extra-qualification on member functions, it lets you repeat
the class name on the method.

llvm-svn: 201918
2014-02-22 00:41:07 +00:00
Warren Hunt c85942038a [MS-ABI] Fix MSRecordLayout to handel MultiDimensionalArrays
A recent change caused multi-dimensional arrays not to be handled 
correctly, this patch fixes that.  Also, it adds a lit test for 
multi-dimensional arrays.

llvm-svn: 201917
2014-02-22 00:40:37 +00:00
Reid Kleckner 324eee45a7 Revert "Replace __FUNCTION__ with __func__, the latter being standard C99/C++11."
This reverts commit r201910.

While __func__ may be standard in C++11, it was only recently added to
MSVC in 2013 CTP, and LLVM supports MSVC 2012.  __FUNCTION__ may not be
standard, but it's *very* portable.

llvm-svn: 201916
2014-02-22 00:37:45 +00:00
Quentin Colombet dec8d55b1d Switch the LLVM error reporting on the new diagnostic system.
The LLVM diagnostic are now wired-up in clang (since r200931),
thus the user experience will not be impacted by this change
anymore.

Related to <rdar://problem/15886697>

llvm-svn: 201915
2014-02-22 00:34:11 +00:00
Warren Hunt 0afa2d2f2b Fix two warnings introduced r201907
Unused variable is removed.  Construction order is changed to match 
declaration order.

llvm-svn: 201914
2014-02-22 00:22:15 +00:00
David Majnemer a64cb5a019 Sema: Don't crash when trying to instantiate a local class with an invalid base specifier
It was previously thought that Sema::InstantiateClass could not fail
from within this point in instantiate.

However, it can happen if the class is invalid some way (i.e. invalid
base specifier).

This fixes PR18907.

Differential Revision: http://llvm-reviews.chandlerc.com/D2850

llvm-svn: 201913
2014-02-22 00:17:46 +00:00
Quentin Colombet a349084a91 [CodeGenPrepare] Move CodeGenPrepare into lib/CodeGen.
CodeGenPrepare uses extensively TargetLowering which is part of libLLVMCodeGen.
This is a layer violation which would introduce eventually a dependence on
CodeGen in ScalarOpts.

Move CodeGenPrepare into libLLVMCodeGen to avoid that.

Follow-up of <rdar://problem/15519855>

llvm-svn: 201912
2014-02-22 00:07:45 +00:00
Ted Kremenek 204c3c50b9 [ObjC] Make attribute 'objc_protocol_requires_explicit_implementation' behave correctly with default property synthesis.
In particular, if we see an @property within the @interface of a class
conforming to a protocol with this attribute, we treat that as
if the implementation were available, per the rules of default
property synthesis.

llvm-svn: 201911
2014-02-22 00:02:03 +00:00
Joerg Sonnenberger b15779f307 Replace __FUNCTION__ with __func__, the latter being standard C99/C++11.
llvm-svn: 201910
2014-02-21 23:55:15 +00:00
Joerg Sonnenberger 938b0df72d Introduce CRT_HAS_128BIT, currently for all __LP64__ platforms.
Use it to enable the various functions for TI mode.

llvm-svn: 201909
2014-02-21 23:53:03 +00:00
Joerg Sonnenberger e245715fca Add Matt Thomas and myself.
llvm-svn: 201908
2014-02-21 23:51:38 +00:00
Warren Hunt fb00c88703 Complete Rewrite of CGRecordLayoutBuilder
CGRecordLayoutBuilder was aging, complex, multi-pass, and shows signs of 
existing before ASTRecordLayoutBuilder.  It redundantly performed many 
layout operations that are now performed by ASTRecordLayoutBuilder and 
asserted that the results were the same.  With the addition of support 
for the MS-ABI, such as placement of vbptrs, vtordisps, different 
bitfield layout and a variety of other features, CGRecordLayoutBuilder 
was growing unwieldy in its redundancy.

This patch re-architects CGRecordLayoutBuilder to not perform any 
redundant layout but rather, as directly as possible, lower an 
ASTRecordLayout to an llvm::type.  The new architecture is significantly 
smaller and simpler than the CGRecordLayoutBuilder and contains fewer 
ABI-specific code paths.  It's also one pass.

The architecture of the new system is described in the comments. For the 
most part, the new system simply takes all of the fields and bases from 
an ASTRecordLayout, sorts them, inserts padding and dumps a record. 
Bitfields, unions and primary virtual bases make this process a bit more 
complicated.  See the inline comments.

In addition, this patch updates a few lit tests due to the fact that the 
new system computes more accurate llvm types than CGRecordLayoutBuilder. 
Each change is commented individually in the review.

Differential Revision: http://llvm-reviews.chandlerc.com/D2795

llvm-svn: 201907
2014-02-21 23:49:50 +00:00
Quentin Colombet 4db08df18e [DAGCombiner] PCMP* sets its result to all ones or zeros so we can AND with the
shifted mask rather than masking and shifting separately.

The patch adds this transformation to the DAGCombiner:

  (shl (and (setcc:i8v16 ...) N01C) N1C) -> (and (setcc:i8v16 ...) N01C<<N1C)

<rdar://problem/16054492>

Patch by Adam Nemet <anemet@apple.com>

llvm-svn: 201906
2014-02-21 23:42:41 +00:00
Ben Langmuir d51ba0b39f Add a VFSFromYAML class and a parser to create it
Provides a way to create a virtual file system using a YAML file that
supports mapping a file to a path on an 'external' file system. The
external file system will typically be the 'real' file system, but for
testing it can be changed.

A future patch will add a clang option to allow the user to specify such
a file and overlay it, but for now this code is only exercised by the
unit tests.

Differential Revision: http://llvm-reviews.chandlerc.com/D2835

llvm-svn: 201905
2014-02-21 23:39:37 +00:00
Juergen Ributzka 4845b488f1 [Stackmaps] Move the target-independent frame index elimination for stackmaps and patchpoints into target-specific code.
The lowering of the frame index for stackmaps and patchpoints requires some
target-specific magic and should therefore be handled in the target-specific
eliminateFrameIndex method.

This is related to <rdar://problem/16106219>

llvm-svn: 201904
2014-02-21 23:29:32 +00:00
Tobias Grosser fa1a4320af Dependences: Do not assign 'WAW' twice
Reported-by: Sebastian Pop <spop@codeaurora.org>
Reported-by: Yabin Hu <yabin.hwu@gmail.com>
llvm-svn: 201903
2014-02-21 23:08:58 +00:00
Tobias Grosser 88640d2b47 Use -polly-codegen-isl in isl-codegen test
Reported-by: Sebastian Pop <spop@codeaurora.org>
llvm-svn: 201902
2014-02-21 23:08:54 +00:00
Warren Hunt 20e4a5d2af Reapply 201734 but with appropriate gcc compatibility
Because GCC incorrectly defines _mm_prefetch to take anything that casts 
to void*, people have started using that behavior.  The previous patch 
that made _mm_prefetch actually take a const char * broke compatibility 
with existing code.  This update to the patch leaves the macro that 
defines _mm_prefetch with the (void*) cast when _MSC_VER is not defined.

llvm-svn: 201901
2014-02-21 23:08:53 +00:00
Rui Ueyama a5dc335574 [PECOFF] Implement /SAFESEH option.
LLD now prints an error message if /SAFESEH option is specified and one or
more input files are not compatible with SEH.

llvm-svn: 201900
2014-02-21 22:50:27 +00:00
Ted Kremenek 27cfe10df8 Add requirement that attribute 'objc_protocol_requires_explicit_implementation' can only be applied to protocol definitions.
llvm-svn: 201899
2014-02-21 22:49:04 +00:00
Tobias Grosser e87e0343de Dependences: Eliminate warning about possibly uninitialized pointers
llvm-svn: 201898
2014-02-21 22:45:48 +00:00
Jim Ingham eac0aa47b4 Oops, probably ought to turn on that fix...
llvm-svn: 201897
2014-02-21 22:36:11 +00:00
Jim Ingham 9d67cc59c4 We have to call waitpid on the lldb side for Mac OS X (even though we've successfully called it
on the debugserver side) when we kill a process or it leaves a zombie around.

llvm-svn: 201896
2014-02-21 22:35:29 +00:00