Commit Graph

63686 Commits

Author SHA1 Message Date
Vasileios Kalintiris 44deb63ff2 [mips] Add test for the dynamic linker when using the mips64el-fedora-linux triple.
We should use the musl linker only when there's no environment specified and
the vendor is MTI. The new test verifies this behaviour and is a follow-up to
the r269411 commit that added the vendor field check.

llvm-svn: 269651
2016-05-16 11:53:51 +00:00
Michael Zuckerman cb85677471 [Clang][AVX512] completing missing intrinsics [vsqrt|vrsqrt|vrcp14 ].
Differential Revision: http://reviews.llvm.org/D20068

llvm-svn: 269649
2016-05-16 11:42:01 +00:00
Craig Topper 1aa231e3aa [X86] Add typecasts to remove most assumptions about what __m128i/__m256i is defined as. Add similar typecasts for the fp types as well.
llvm-svn: 269632
2016-05-16 06:38:42 +00:00
Craig Topper 9c6c85f1ad [AVX512] Add typecasts to some intrinsics to avoid doing operations on the __m512/__m512i/__m512d types.
llvm-svn: 269631
2016-05-16 06:38:36 +00:00
Saleem Abdulrasool 1e6c4060ad CodeGen: convert some const char * to StringRef
Convert some use of const char * to StringRef.  NFC.

llvm-svn: 269630
2016-05-16 05:06:49 +00:00
Nick Lewycky 0624b82260 Make this SourceLocation getter const LLVM_READONLY like others in the same file.
llvm-svn: 269625
2016-05-16 02:46:07 +00:00
Mike Spertus b27ebb8824 Simple visualization of expressions
While more could be done, showing the type is a lot better than what is there now.

llvm-svn: 269623
2016-05-16 01:36:09 +00:00
Craig Topper e5cc18054a [AVX512] Use correct types in test case.
llvm-svn: 269622
2016-05-16 01:09:19 +00:00
Craig Topper 91f23d900f [X86] Remove bad cast from the 'int' return type of __builtin_ia32_kortestchi to '__mask16' before return in an 'int' intrinsic.
llvm-svn: 269621
2016-05-16 01:09:16 +00:00
Craig Topper 7d00d2031d [AVX512] Fix bad typecasts on return value for 512-bit integer byte/word compare builtins.
llvm-svn: 269620
2016-05-16 00:51:06 +00:00
Craig Topper 0f7ea93541 [X86] Add immediate range checks for many of the builtins.
llvm-svn: 269619
2016-05-15 22:18:00 +00:00
Craig Topper 0ed182d1de [AVX512] Immediate argument for PALIGNR builtin should be an ICE./
llvm-svn: 269618
2016-05-15 22:17:57 +00:00
Craig Topper dca1f230ae [AVX512] Add intrinsics for 512-bit insertf32x8/insertf32x4/inserti32x4.
llvm-svn: 269617
2016-05-15 21:26:20 +00:00
Craig Topper 79d05c9b3d [AVX512] Mark some integer builtin arguments that go to immediates in final instructions as an ICE.
llvm-svn: 269613
2016-05-15 20:10:06 +00:00
Craig Topper 9864c59c89 [AVX512] Move unary negations to the left side of typecasts to specific vector type. The __m128/__m256/__m512 types should be treated more opaquely and not have any operations performed on them.
llvm-svn: 269612
2016-05-15 20:10:03 +00:00
Craig Topper f32e2fbe0e [AVX512] Use the correct mask type in an intrinsic.
llvm-svn: 269611
2016-05-15 20:10:00 +00:00
Craig Topper b81d430d3a [AVX512] Fix an intrinsic that was passing -2 as a mask instead of -1.
llvm-svn: 269610
2016-05-15 20:09:58 +00:00
Craig Topper bf8d85a0f3 [AVX512] Make the permd builtins take a 32-bit immediate to match the software spec.
llvm-svn: 269580
2016-05-14 21:13:31 +00:00
Oleksiy Vyalov 94854be9e1 Revert r269546 "Added support to the ASTImporter for C++ constructor initializers." as it breaks TestDataFormatterSynthVal.DataFormatterSynthValueTestCase.test_with_run_command_dwarf test - http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/14699
llvm-svn: 269575
2016-05-14 19:07:13 +00:00
Nick Lewycky 2eeddfb1ef Warn when a reference is bound to an empty l-value (dereferenced null pointer).
llvm-svn: 269572
2016-05-14 17:44:14 +00:00
Craig Topper 77334aa996 [AVX512] Immediate for permd builtins should be an ICE.
llvm-svn: 269570
2016-05-14 15:27:13 +00:00
Daniel Sanders e160f83f71 [mips] Enable IAS by default for 32-bit MIPS targets (O32).
Summary:
The MIPS IAS can now pass 'ninja check-all', recurse, build a bootable linux
kernel, and pass a variety of LNT testing.

Unfortunately we can't enable it by default for 64-bit targets yet since the N32
ABI is still very buggy and this also means we can't enable it for N64 either
because we can't distinguish between N32 and N64 in the relevant code.

Reviewers: vkalintiris

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D18759
Differential Revision: http://reviews.llvm.org/D18761

llvm-svn: 269560
2016-05-14 12:43:08 +00:00
NAKAMURA Takumi 81b08dedde ModuleMap.h: Fix a \param. [-Wdocumentation]
llvm-svn: 269559
2016-05-14 12:37:06 +00:00
NAKAMURA Takumi 2326f79a60 MSVCToolChain.cpp: Make version.dll generic for win32.
We may consider msvc features may be capable on mingw host, if it can.
Consider --host=mingw --target=msvc.

llvm-svn: 269557
2016-05-14 08:12:37 +00:00
NAKAMURA Takumi 4b8e3e59cd MSVCToolChain.cpp: Use explicit constructor for SmallString from std::string, to appease mingw-g++.
llvm-svn: 269556
2016-05-14 08:09:12 +00:00
Sean Callanan f3682a7014 Update identifiers as needed when loading macros from serialized ASTs.
This is essential for iterating across macros properly, which LLDB does when
loading macros from modules.  A naiver version of this patch (without the
conditional) caused assertion failures in the testsuite, but this version should
be safe.

Thanks to Ben Langmuir for the refinement that made this work.

llvm-svn: 269554
2016-05-14 06:24:14 +00:00
Sean Callanan f94ef1df8b Fixed a bug where the ASTImporter didn't propagate builtin IDs at all.
IdentifierInfos are assigned builtin IDs during parsing, but Idents.get() does 
not do that work.  So the ASTImporter needs to additionally set the builtin ID
for the newly-created IdentifierInfo.  This patch does that.

Currently ASTMerge tests only check syntax and the ASTMatchers don't check for
builtin IDs, so this is tricky to test, but LLDB will have a test for this.

llvm-svn: 269553
2016-05-14 06:11:19 +00:00
Craig Topper 4537ea74eb [X86] Change most 'void' pointers in builtin type lists to more correct types. Fix some unaligned load/store intrinsics to use a less aligned type in their pointer casts.
llvm-svn: 269552
2016-05-14 06:03:13 +00:00
Sean Callanan 041cceb019 Handle injected class names in the ASTImporter.
Every class as parsed by Clang has a forward declaration of itself as a member:

class A {
  class A;
  ...
}

but when the parser generates this it ensures that the RecordTypes for the two 
are the same.  This makes (among other things) inheritance work.  This patch
fixes a bug where the ASTImporter generated two separate RecordTypes when
importing the class and the contained forward declaration, and adds a test case.

Thanks to Doug Gregor for advice on this.

llvm-svn: 269551
2016-05-14 05:43:57 +00:00
Chandler Carruth 1b766d09d1 Revert "Reapply "[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC""
This reverts commit r269492 as the corresponding LLVM commit was
reverted due to lots of warnings. See the review thread for the original
LLVM commit (r269491) for details.

llvm-svn: 269549
2016-05-14 05:39:45 +00:00
Sean Callanan 55d486d72a Added support to the ASTImporter for C++ constructor initializers.
Thanks to Aleksei Sidorin for review and advice.

llvm-svn: 269546
2016-05-14 05:20:31 +00:00
Richard Smith 9385d704c1 When typo-correcting a using-declaration, actually correct the name of the
UsingDecl (so that redeclaration lookup can find it).

llvm-svn: 269530
2016-05-14 01:58:49 +00:00
Richard Smith 81ef0e1adb Fix some typos.
llvm-svn: 269528
2016-05-14 01:21:40 +00:00
Craig Topper b1d4e18dfc [AVX512] Update pshufd type strings to match the backend. Also mark the immediate as an ICE instead of marking the previous vector as const.
llvm-svn: 269527
2016-05-14 00:49:36 +00:00
Bruno Cardoso Lopes 32b2897af6 [VFS] Add level() method to vfs::recursive_directory_iterator
Unlike sys::fs::recursive_directory_iterator,
vfs::recursive_directory_iterator does not implement the level() method,
which tells how deep in the directory tree the current iterator is. This
is needed in the vfs::recursive_directory_iterator so that future
improvements to the crash reproducer will be able to properly access
header for umbrellas when looking into the VFS.

rdar://problem/25880368

llvm-svn: 269520
2016-05-14 00:00:18 +00:00
Adrian McCarthy e4b26fc7a7 Get default -fms-compatibility-version from cl.exe's version
-fms-compatibility-version was defaulting to 18 (VS 2013), which is a pain if your environment is pointing to version 19 (VS 2015) libraries.

If cl.exe can be found, this patch uses its version number as the default instead. It re-uses the existing code to find the Visual Studio binaries folder and WinAPI methods to check its version. You can still explicitly specify a compatibility version on the command line. If you don't have cl.exe, this should be a no-op and you'll get the old default of 18.

This affected the tests, which assumed that if you didn't specific a version, that it would default to 18, but this won't be true for all machines. So a couple test cases had to be eliminated and a couple others had to be tweaked to allow for various outputs.

Addresses: https://llvm.org/bugs/show_bug.cgi?id=27215

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

llvm-svn: 269515
2016-05-13 23:20:11 +00:00
Bruno Cardoso Lopes b3a0fa4863 [ModuleMap][CrashReproducer] Collect headers from inner frameworks
(1) Collect headers under inner frameworks (frameworks inside other
other frameworks).
(2) Make sure we also collect the right header files inside them.

More info on (2):

Consider a dummy framework module B, with header Frameworks/B/B.h. Now
consider that another framework A, with header Frameworks/A/A.h, has a
layout with a inner framework Frameworks/A/Frameworks/B/B.h, where the
"B/B.h" part is a symlink for Frameworks/B/B.h. Also assume that
Frameworks/A/A.h includes <B/B.h>.

When parsing header Frameworks/A/A.h, framework module lookup is
performed in search for B, and it happens that
"Frameworks/A/Frameworks/B/B.h" path is registered in the module instead
of real "Frameworks/B/B.h". This occurs because
"Frameworks/A/Frameworks/B/B.h" is scanned first by the FileManager,
when looking for inner framework modules under Frameworks/A/Frameworks.
This makes Frameworks/A/Frameworks/B/B.h the default cached named inside
the FileManager for the B.h file UID.

This leads to modules being built without consistent paths to underlying
header files. This is usually not a problem in regular compilation flow,
but it's an issue when running the crash reproducer. The issue is that
clangs collect "Frameworks/A/Frameworks/B/B.h" but not
"Frameworks/B/B.h" into the VFS, leading to err_mmap_umbrella_clash. So
make sure we also collect the original header.

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

rdar://problem/25880368

llvm-svn: 269502
2016-05-13 22:21:51 +00:00
Vedant Kumar 0b7b7ae806 Reapply "[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC"
Sync up with "(llvm) Use Error in InstrProf and Coverage".

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

llvm-svn: 269492
2016-05-13 21:51:02 +00:00
Tim Northover 862eaf8a12 ARM-MachO: stop claiming to be EABI
Embedded ARM MachO targets are AAPCS but not full EABI (we don't use
__aeabi_whatever and the functions are allowed to be hard-float).

Turns out there was already a test for this, but its original purpose had
become corrupted over the years.

llvm-svn: 269487
2016-05-13 21:26:45 +00:00
Vedant Kumar 2d87639c5a Revert "[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC"
This reverts commit r269463. It fails two llvm-profdata tests.

llvm-svn: 269468
2016-05-13 20:10:22 +00:00
David Majnemer 833b91eee8 [MS ABI] Delegating constructors should not assume they are most derived
A constructor needs to know whether or not it is most derived in order
to determine if it is responsible for virtual bases.  Delegating
constructors assumed they were most derived.

llvm-svn: 269465
2016-05-13 20:05:09 +00:00
Vedant Kumar 31af1fd161 [ProfileData] (clang) Use Error in InstrProf and Coverage, NFC
Sync up with "(llvm) Use Error in InstrProf and Coverage".

llvm-svn: 269463
2016-05-13 20:01:34 +00:00
Etienne Bergeron 75e52725e4 Add an AST matcher for CastExpr kind
Summary:
This AST matcher will match a given CastExpr kind.
It's an narrowing matcher on CastExpr.

Reviewers: klimek, alexfh, sbenza, aaron.ballman

Subscribers: Prazek, jroelofs, aaron.ballman, klimek, cfe-commits

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

llvm-svn: 269460
2016-05-13 19:36:55 +00:00
Richard Smith a87b766027 Use marginally more appropriate functions to detect if we should declare an
implicit copy constructor/assignment, and other minor cleanups. No
functionality change intended.

llvm-svn: 269457
2016-05-13 18:48:05 +00:00
Richard Smith 4e67cf9a59 Fix module map typo in r269347.
llvm-svn: 269440
2016-05-13 17:28:51 +00:00
Yaxun Liu fa1df45c0d Revert "[OpenCL] Add supported OpenCL extensions to target info."
Revert r269431 due to build failure caused by warning msg:

  llvm/tools/clang/lib/Basic/Targets.cpp:2090:9: error: 'setSupportedOpenCLOpts' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
   void setSupportedOpenCLOpts() {

llvm-svn: 269435
2016-05-13 17:16:26 +00:00
Yaxun Liu 64936ce91d [OpenCL] Add supported OpenCL extensions to target info.
Add supported OpenCL extensions to target info. It serves as default values to save the users of the burden setting each supported extensions and optional core features in command line.

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

llvm-svn: 269431
2016-05-13 15:44:37 +00:00
Yaron Keren 5c71617546 Prune four superfluous ExternalSemaSource.h includes and one forward declaration in Sema.h
where ExternalSemaSource.h was already included due to ExternalSemaSource:: member uses.

llvm-svn: 269423
2016-05-13 14:53:19 +00:00
Oleg Ranevskyy 7232f66051 [CodeGen] Clang does not choose aapcs-vfp calling convention for ARM bare metal target with hard float (EABIHF)
Summary:
Clang does not detect `aapcs-vfp` for the EABIHF environment. The reason is that only GNUEABIHF is considered while choosing calling convention, EABIHF is ignored.

This causes clang to use `aapcs` for EABIHF and add the `arm_aapcscc` specifier to functions in generated IR.

The modified `arm-cc.c` test checks that no calling convention specifier is added to functions for EABIHF, which means the default one is used (`CallingConv::ARM_AAPCS_VFP`).

Reviewers: rengolin, compnerd, t.p.northover

Subscribers: aemerson, rengolin, asl, cfe-commits

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

llvm-svn: 269419
2016-05-13 14:45:57 +00:00
Etienne Bergeron d51d9ecdcb [AST] Add missing const qualifiers to AstContext in Type.cpp
Summary:
Add some missing const qualifiers to AstContext.
The ASTContext can't be modified with accessors.

There is no behavior change. This patch is cleanup only.

Reviewers: rsmith

Subscribers: cfe-commits

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

llvm-svn: 269418
2016-05-13 14:31:44 +00:00