summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP] Added initial support for 'omp parallel for'.Alexey Bataev2014-07-0720-11/+2672
| | | | llvm-svn: 212453
* CodeGen: Cleanup MS ABI RTTI LLVM IRDavid Majnemer2014-07-074-249/+249
| | | | | | | | | | | | | The MS ABI RTTI emission code would choose names for IR types like %"MSRTTITypeDescriptor\02". This name is undesirable because it requires escaping; the underlying reason for this is that the name is unprintable. Fix this by naming it %rtti.TypeDescriptor2. While here, stop trying to do lookups in the LLVM Module's type table. Instead, store the IR types in MicrosoftCXXABI. Lookups by name aren't particularly fast. llvm-svn: 212439
* Fix an iterator invalidation issue: deserializing a key function can write toRichard Smith2014-07-071-0/+97
| | | | | | | the key functions table. Don't hold references to anything within that table across such an access. llvm-svn: 212437
* Add an explicit diagnostic for the case where an expression is not a constantRichard Smith2014-07-071-0/+13
| | | | | | expression because it uses 'this'. Inspired by PR20219 comment#2. llvm-svn: 212433
* Add an AST node for __leave statements, hook it up.Nico Weber2014-07-072-7/+5
| | | | | | | Codegen is still missing (and I won't work on that), but __leave is now as implemented as __try and friends. llvm-svn: 212425
* Sema: Check that __leave is contained in a __try block.Nico Weber2014-07-062-10/+6
| | | | | | | | | Give scope a SEHTryScope bit, set that in ParseSEHTry(), and let Sema walk the scope chain to find the SEHTry parent on __leave statements. (They are rare enough that it seems better to do the walk instead of giving Scope a SEHTryParent pointer -- this is similar to AtCatchScope.) llvm-svn: 212422
* Add parser support for __leave (sema and onward still missing).Nico Weber2014-07-062-1/+37
| | | | llvm-svn: 212421
* Giving this test a triple to satisfy the build bots.Aaron Ballman2014-07-061-1/+1
| | | | llvm-svn: 212418
* The MicrosoftExtensions.c test file should not rely on -x objective-c++. ↵Aaron Ballman2014-07-062-66/+53
| | | | | | Removed that from the RUN line, fixed obvious C++isms in the code, and moved some C++ tests into MicrosoftExtensions.cpp instead. As a drive-by, changed the line endings for MicrosoftExtensions.c to be LF instead of CRLF. llvm-svn: 212417
* This test case does not require -Wno-missing-declarations or -x objective-c++.Aaron Ballman2014-07-061-1/+1
| | | | llvm-svn: 212416
* Move InterlockedBitTestAndSet into its own test fileEhsan Akhgari2014-07-062-11/+13
| | | | | | | | | | | | | | Summary: This gives us back the test coverage we lost when I made MicrosoftExtensions.c x86-only. Reviewers: majnemer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4401 llvm-svn: 212414
* Fix the MicrosoftExtensions.c targetEhsan Akhgari2014-07-061-0/+1
| | | | llvm-svn: 212393
* Enable the InterlockedBitTestAndSet testEhsan Akhgari2014-07-061-3/+0
| | | | llvm-svn: 212392
* Add support for nested blocks in Microsoft inline assemblyEhsan Akhgari2014-07-064-4/+31
| | | | | | This fixes http://llvm.org/PR20204. llvm-svn: 212389
* clang-cl: /showIncludes output should go to stdout, not stderr. Fixes PR20217.Nico Weber2014-07-061-4/+4
| | | | llvm-svn: 212383
* CodeGen: add support for a few MSVC ARM intrinsicsSaleem Abdulrasool2014-07-051-0/+63
| | | | | | | | This adds support for simple MSVC compatibility mode intrinsics. These intrinsics are simple in that they are either directly passed through to the annotated MSBuiltin intrinsic or they mirror existing GCC builtins. llvm-svn: 212378
* Add a test case for the tilde operator in Microsoft inline assemblyEhsan Akhgari2014-07-051-0/+2
| | | | llvm-svn: 212373
* Fix up the test that expects the failure fixed in r212352Ehsan Akhgari2014-07-041-2/+0
| | | | llvm-svn: 212353
* [Driver][Mips] Support one more MIPS CPU name - octeon.Simon Atanasyan2014-07-042-0/+11
| | | | llvm-svn: 212339
* [Driver][Mips] Support more MIPS CPU names: mips1 - mips5.Simon Atanasyan2014-07-042-0/+55
| | | | llvm-svn: 212338
* gcc comptability: silent -fdefer-pop & -fno-defer-pop Sylvestre Ledru2014-07-041-0/+1
| | | | | | | | | | | | Reviewers: rafael, rnk Reviewed By: rnk Subscribers: rnk, cfe-commits Differential Revision: http://reviews.llvm.org/D4357 llvm-svn: 212327
* Let test/Unit/lit.cfg add config.shlibdir to $PATH on DLL platforms like ↵NAKAMURA Takumi2014-07-041-0/+5
| | | | | | | | cygming. This makes unittests run with BUILD_SHARED_LIBS on DLL platforms. llvm-svn: 212316
* Trailing linefeedNAKAMURA Takumi2014-07-041-1/+0
| | | | llvm-svn: 212312
* Fixed test CodeGen/captured-statements.c for powerpc64-linux.Alexey Bataev2014-07-041-2/+2
| | | | llvm-svn: 212311
* Restore global static array in test caseGerolf Hoflehner2014-07-031-1/+1
| | | | llvm-svn: 212285
* [ARM] Implement ISB memory barrier intrinsicYi Kong2014-07-032-0/+7
| | | | | | | Adds support for __builtin_arm_isb. Also corrects DSB and ISB instructions modelling by adding has-side-effects property. llvm-svn: 212277
* Add the __qdbl intrinsic to the arm_acle.h headerRenato Golin2014-07-031-0/+9
| | | | | | Patch by: Moritz Roth llvm-svn: 212264
* Move the calling of emitTargetMD() later.Robert Lytton2014-07-031-40/+51
| | | | | | | | | | | | | | | | Summary: Because a global created by GetOrCreateLLVMGlobal() is not finalised until later viz: extern char a[]; char f(){ return a[5];} char a[10]; Change MangledDeclNames to use a MapVector rather than a DenseMap so that the Metadata is output in order of original declaration, so to make deterministic and improve human readablity. Differential Revision: http://reviews.llvm.org/D4176 llvm-svn: 212263
* ARMEB: Fix function result return for composite typesChristian Pirker2014-07-031-0/+37
| | | | | | Reviewed at http://reviews.llvm.org/D4364 llvm-svn: 212261
* [Driver][Mips] Check MIPS CPU name provided to the Clang driver.Simon Atanasyan2014-07-031-0/+10
| | | | llvm-svn: 212260
* MS ABI: Get linkage of RTTI data correctDavid Majnemer2014-07-031-0/+13
| | | | | | | | | | | | | | | | | The Itanium rules are not appropriate for the MS ABI. RTTI data is _never_ imported and thus is never available_externally. It is either internal (if the type's linkage is internal) or linkonce_odr. This also means that classes which inherit from dllimport'd bases force their translation unit to duplicate the entirety of the RTTI data of that base. Interestingly, the complete object locator can never be referenced by translation units which import the class. This fixes PR20106. llvm-svn: 212256
* ARM: rename ARM builtins to use __builtin_arm prefixSaleem Abdulrasool2014-07-031-5/+5
| | | | | | | | | This corrects SVN r212196's naming change to use the proper prefix of `__builtin_arm_` instead of `__builtin_`. Thanks to Yi Kong for pointing out the incorrect naming! llvm-svn: 212253
* Enable clang to continue to parse libstdc++4.6 and stlport after r210091.Nico Weber2014-07-021-0/+23
| | | | | | | | | | r210091 made initialization checking more strict in c++11 mode. LWG2193 is about changing standard libraries to still be valid under these new rules, but older libstdc++ (e.g. libstdc++4.6 in -D_GLIBCXX_DEBUG=1 mode, or stlport) do not implement that yet. So fall back to the C++03 semantics for container classes in system headers below the std namespace. llvm-svn: 212238
* CodeGen: make target builtins support languagesSaleem Abdulrasool2014-07-022-8/+40
| | | | | | | | | | This extends the target builtin support to allow language specific annotations (i.e. LANGBUILTIN). This is to allow MSVC compatibility whilst retaining the ability to have EABI targets use a __builtin_ prefix. This is merely to allow uniformity in the EABI case where the unprefixed name is provided as an alias in the header. llvm-svn: 212196
* [ASan] Print exact source location of global variables in error reports.Alexey Samsonov2014-07-022-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://code.google.com/p/address-sanitizer/issues/detail?id=299 for the original feature request. Introduce llvm.asan.globals metadata, which Clang (or any other frontend) may use to report extra information about global variables to ASan instrumentation pass in the backend. This metadata replaces llvm.asan.dynamically_initialized_globals that was used to detect init-order bugs. llvm.asan.globals contains the following data for each global: 1) source location (file/line/column info); 2) whether it is dynamically initialized; 3) whether it is blacklisted (shouldn't be instrumented). Source location data is then emitted in the binary and can be picked up by ASan runtime in case it needs to print error report involving some global. For example: 0x... is located 4 bytes to the right of global variable 'C::array' defined in '/path/to/file:17:8' (0x...) of size 40 These source locations are printed even if the binary doesn't have any debug info. This is an ABI-breaking change. ASan initialization is renamed to __asan_init_v4(). Pre-built libraries compiled with older Clang will not work with the fresh runtime. llvm-svn: 212188
* [mips] Added additional test cases for passing -mabi to the assembler.Daniel Sanders2014-07-021-0/+48
| | | | | | | | | | | Summary: This patch adds minimal coverage for each -mcpu value to ensure that none of them can pass an empty string in -mabi. Prior to r212176, many -mcpu values would trigger this. Differential Revision: http://reviews.llvm.org/D4272 llvm-svn: 212182
* [mips] Make FileCheck prefixes match the CPU they checkDaniel Sanders2014-07-021-16/+16
| | | | | | | | | | | Summary: For example: s/MIPS32-EB-AS/MIPS32R2-EB-AS/ since it is for MIPS32r2 not MIPS32. This reduces the noise in my next Clang patch. Differential Revision: http://reviews.llvm.org/D4271 llvm-svn: 212177
* [Driver][Mips] If ABI name is not provided deduce it from the target tripleSimon Atanasyan2014-07-021-0/+40
| | | | | | not from the CPU name. This approach is closer to the method used by gcc driver. llvm-svn: 212176
* ARM: add support for v8 ldaex/stlex builtins.Tim Northover2014-07-023-1/+262
| | | | | | | | | | | | | | ARMv8 adds (to both AArch32 and AArch64) acquiring and releasing variants of the exclusive operations, in line with the C++11 memory model. This adds support for two new intrinsics to expose them to C & C++ developers directly: __builtin_arm_ldaex and __builtin_arm_stlex, in direct analogy with the versions with no implicit barrier. rdar://problem/15885451 llvm-svn: 212175
* Make FunctionDecl::getReturnTypeSourceRange() support non-builtin typesAlp Toker2014-07-021-4/+6
| | | | | | | Also document that the function is a "best-effort" facility to extract source ranges from limited AST type location info. llvm-svn: 212174
* X86: inline all atomic operations up to 128-bits.Tim Northover2014-07-021-0/+29
| | | | | | | | | | The backend *can* cope with all of these now, so Clang should give it the chance. On CPUs without cmpxchg16b (e.g. the original athlon64) LLVM can reform the libcalls. rdar://problem/13496295 llvm-svn: 212173
* Don't accept qualified 'int' main return types in C++ or standard C modeAlp Toker2014-07-022-0/+4
| | | | | | | | | C++ [basic.start.main]p1: "It shall have a return type of type int" ISO C is also clear about this, so only accept 'int' with qualifiers in GNUMode C. llvm-svn: 212171
* Added test for capturing VLA types if the captured variable is a function ↵Alexey Bataev2014-07-021-0/+13
| | | | | | parameter. llvm-svn: 212170
* Prevent Clang from crashing on template code.Richard Trieu2014-07-021-0/+15
| | | | | | | | | | Fixes PR20110, where Clang hits an assertion failure when it expects that the sub-expression of a bit cast to pointer to also be a pointer, but gets a value instead. Differential Revision: http://reviews.llvm.org/D4280 llvm-svn: 212160
* clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp: Relax an expression for ↵NAKAMURA Takumi2014-07-011-1/+1
| | | | | | -Asserts. llvm-svn: 212144
* CodeGenCXX: Add tests for RTTI in VFTablesDavid Majnemer2014-07-011-0/+41
| | | | | | This test was supposed to go in with r212125. llvm-svn: 212139
* Driver: Handle /GR- in a compatible way with MSVCDavid Majnemer2014-07-013-7/+31
| | | | | | | | | | | | | | | | | There are slight differences between /GR- and -fno-rtti which made mapping one to the other inappropriate. -fno-rtti disables dynamic_cast, typeid, and does not emit RTTI related information for the v-table. /GR- does not generate complete object locators and thus will not reference them in vftables. However, constructs like dynamic_cast and typeid are permitted. This should bring our implementation of RTTI up to semantic parity with MSVC modulo bugs. llvm-svn: 212138
* MS ABI: Reference MSVC RTTI from the VFTableDavid Majnemer2014-07-011-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pointer for a class's RTTI data comes right before the VFTable but has no name. To be properly compatible with this, we do the following: * Create a single GlobalVariable which holds the contents of the VFTable _and_ the pointer to the RTTI data. * Create a GlobalAlias, with appropriate linkage/visibility, that points just after the RTTI data pointer. This ensures that the VFTable symbol will always refer to VFTable data. * Create a Comdat with a "Largest" SelectionKind and stick the private GlobalVariable in it. By transitivity, the GlobalAlias will be a member of the Comdat group. Using "Largest" ensures that foreign definitions without an RTTI data pointer will _not_ be chosen in the final linked image. Whether or not we emit RTTI data depends on several things: * The -fno-rtti flag implies that we should never not emit a pointer to RTTI data before the VFTable. * __declspec(dllimport) brings in the VFTable from a remote DLL. Use an available_externally GlobalVariable to provide a local definition of the VFTable. This means that we won't have any available_externally definitions of things like complete object locators. This is acceptable because they are never directly referenced. To my knowledge, this completes the implementation of MSVC RTTI code generation. Further semantic work should be done to properly support /GR-. llvm-svn: 212125
* clang-cl: Ignore /Zc:inline and /Zc:rvalueCastReid Kleckner2014-07-011-0/+2
| | | | | | | | | | These flags enable behavior in MSVC that Clang has by default. /Zc:inline essentially marks all COMDATs as discardable. In LLVM parlance, this means using linkonce_odr linkage, which is what we already do. llvm-svn: 212117
* GCC compatibility: Ignore -finput_charset=UTF-8 argument. It is the default ↵Sylvestre Ledru2014-07-011-0/+4
| | | | | | | | | | | | | | | | in Clang. Currently, we fail with an error. Reviewers: rafael Reviewed By: rafael Subscribers: rnk, cfe-commits Differential Revision: http://reviews.llvm.org/D4347 llvm-svn: 212110
OpenPOWER on IntegriCloud