summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
...
* [PPC64LE] Add a CALL_ELF macro to indicate use of the ELFv2 ABI.Will Schmidt2014-03-241-0/+1
| | | | | | | | | | | | | | | | | Additional clarification from Uli for the background on _CALL_ELF: "Historically GCC has provided various _CALL_... predefines depending on the ABI currently being compiled for. (_CALL_SYSV,_CALL_AIXDESC, _CALL_DARWIN ) When we needed a new define for the current ABI, we decided on using _CALL_ELF since the official name of the ABI is the OpenPower ElfV2 ABI, with the current Linux ABI retro-actively being renamed the ELFv1 ABI and so we decided on using _CALL_ELF to identify the Linux (+BSD etc.) ELF ABI, with _CALL_ELF=1 for the v1 ABI and _CALL_ELF=2 for the v2 ABI. (Note that this matches the gcc compiler switch -mabi=elfv1 vs. -mabi=elfv2)." In code, a (_CALL_ELF==2) check will indicate when the ELFv2 ABI is to be used. This is the desired default for the PPC64 LE target. llvm-svn: 204627
* Update DataLayout/DescriptionString for ppc64leWill Schmidt2014-03-241-2/+7
| | | | | | | | | | Update DataLayout/DescriptionString for ppc64le Similar LLVM change made in r203664 Testcase included. llvm-svn: 204613
* AArch64_BE test case for predefined macrosChristian Pirker2014-03-241-3/+2
| | | | llvm-svn: 204604
* [OPENMP] parsing of clause 'safelen' (for directive 'omp simd')Alexey Bataev2014-03-211-0/+2
| | | | llvm-svn: 204428
* Fix a typo in r204164 that made *all* keywords available in OpenCL mode.Richard Smith2014-03-181-1/+1
| | | | llvm-svn: 204196
* Creating a printing policy for "half":Yunzhong Gao2014-03-181-0/+2
| | | | | | | | | | | | Since "half" is an OpenCL keyword and clang accepts __fp16 as an extension for other languages, error messages and metadata (and hence debug info) should refer to the half-precision floating point as "__fp16" instead of "half" when compiling for non-OpenCL languages. This patch creates a new printing policy for half in a similar manner to what is done for bool and wchar_t. Differential Revision: http://llvm-reviews.chandlerc.com/D2952 llvm-svn: 204164
* De-virtualize a method since it doesn't override anything and isn't ↵Craig Topper2014-03-111-2/+1
| | | | | | overridden itself. llvm-svn: 203538
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-112-365/+364
| | | | | | class. llvm-svn: 203537
* [C++11] Avoid implicit conversion of ArrayRef to std::vector and use move ↵Benjamin Kramer2014-03-101-5/+1
| | | | | | semantics where appropriate. llvm-svn: 203477
* Make __LITTLE_ENDIAN__/__BIG_ENDOAN__ common PredefinedMacrosRobert Lytton2014-03-101-12/+0
| | | | llvm-svn: 203455
* [C++11] Replace OwningPtr include with <memory>.Ahmed Charles2014-03-092-2/+2
| | | | llvm-svn: 203389
* Module [extern_c] attribute: inherit to submodules, don't write 'extern "C"'Richard Smith2014-03-081-0/+2
| | | | | | blocks when building in C mode, and serialize and deserialize the attribute. llvm-svn: 203317
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-074-14/+14
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* Change OwningPtr::take() to OwningPtr::release().Ahmed Charles2014-03-074-9/+9
| | | | | | This is a precursor to moving to std::unique_ptr. llvm-svn: 203275
* Remove dead code I introduced 6 years, 4 months ago in r43518.Ted Kremenek2014-03-061-25/+0
| | | | | | Found by -Wunreachable-code. llvm-svn: 203167
* Update for LLVM API changeSaleem Abdulrasool2014-03-061-1/+1
| | | | | | | Use the new getObjectFormat/setObjectFormat instead of Environment now that the file format is a separate field. llvm-svn: 203161
* [OPENMP] Clause 'num_threads'Alexey Bataev2014-03-061-0/+2
| | | | llvm-svn: 203087
* Attempt to re-enable the VFS unittests on WindowsBen Langmuir2014-03-051-2/+4
| | | | | | | Using a //net/ path to hopefully avoid problems with non-absolute paths on Windows. llvm-svn: 203010
* Support relative paths in VFSFromYAMLBen Langmuir2014-03-041-3/+10
| | | | | | | | | Use llvm::sys::fs::make_absolute to get an absolute path before matching. Also, allow "." directories to enable testing. ".." is still not supported, and will require crossing file system boundaries to implement correctly. llvm-svn: 202903
* Add a PPC inline asm constraint type for single CR bitsHal Finkel2014-03-021-0/+15
| | | | | | | | | | | | | | | | This adds support for the PPC "wc" inline asm constraint (used for allocating individual CR bits). Support for this constraint type was recently added to the LLVM PowerPC backend. Although gcc does not currently support allocating individual CR bits, this identifier choice has been coordinated with the gcc PowerPC team, and will be marked as reserved for this purpose in the gcc constraints.md file. Prior to this change, none of the multi-character PPC constraints were handled correctly (the '^' escape character was not being added as required by the parsing code in LLVM). This should now be fixed. I'll add tests for these other constraints as support is added for them in the backend. llvm-svn: 202658
* [C++11] Use std::atomic instead of LLVM's.Benjamin Kramer2014-03-021-3/+3
| | | | | | No intended functionality change. llvm-svn: 202652
* [C++11] Replace llvm::tie with std::tie.Benjamin Kramer2014-03-021-2/+2
| | | | llvm-svn: 202639
* Switch all uses of LLVM_OVERRIDE to just use 'override' directly.Craig Topper2014-03-021-8/+8
| | | | llvm-svn: 202625
* Add [extern_c] attribute for modules, allowing a C module to be imported ↵Richard Smith2014-03-021-4/+3
| | | | | | within an extern "C" block in C++ code. llvm-svn: 202615
* [C++11] Switch from the llvm_move macro to directly calling std::move.Chandler Carruth2014-03-021-3/+3
| | | | llvm-svn: 202611
* Move private classes into anonymous namespaces.Benjamin Kramer2014-03-011-0/+4
| | | | llvm-svn: 202595
* Reapply fixed "Honour 'use-external-names' in FileManager"Ben Langmuir2014-02-283-9/+31
| | | | | | | | | | | | | | | | Was r202442 There were two issues with the original patch that have now been fixed. 1. We were memset'ing over a FileEntry in a test case. After adding a std::string to FileEntry, this still happened to not break for me. 2. I didn't pass the FileManager into the new compiler instance in compileModule. This was hidden in some cases by the fact I didn't clear the module cache in the test. Also, I changed the copy constructor for FileEntry, which was memcpy'ing in a (now) unsafe way. llvm-svn: 202539
* Add 'remark' diagnostic type in 'clang'Tobias Grosser2014-02-281-3/+12
| | | | | | | | | | | | | | | | | | | | | | | A 'remark' is information that is not an error or a warning, but rather some additional information provided to the user. In contrast to a 'note' a 'remark' is an independent diagnostic, whereas a 'note' always depends on another diagnostic. A typical use case for remark nodes is information provided to the user, e.g. information provided by the vectorizer about loops that have been vectorized. This patch provides the initial implementation of 'remarks'. It includes the actual definiton of the remark nodes, their printing as well as basic parameter handling. We are reusing the existing diagnostic parameters which means a remark can be enabled with normal '-Wdiagnostic-name' flags and can be upgraded to an error using '-Werror=diagnostic-name'. '-Werror' alone does not upgrade remarks. This patch is by intention minimal in terms of parameter handling. More experience and more discussions will most likely lead to further enhancements in the parameter handling. llvm-svn: 202475
* Revert "Honour 'use-external-names' in FileManager"Ben Langmuir2014-02-273-31/+9
| | | | | | Revert r202442, which broke the buildbots. llvm-svn: 202443
* Honour 'use-external-names' in FileManagerBen Langmuir2014-02-273-9/+31
| | | | | | | | Pass through the externally-visible names that we got from the VFS down to FileManager, and test that this is the name showing up in __FILE__, diagnostics, and debug information. llvm-svn: 202442
* Reapply r202420 hopefully fixed for other STLsBen Langmuir2014-02-271-48/+12
| | | | | | | Keep the copy constructor around, and add a FIXME that we should really remove it as soon as we have C++11 std::map's emplace function. llvm-svn: 202439
* Revert "Remove constructors from FileEntry that prevent owning resources"Ben Langmuir2014-02-271-12/+48
| | | | | | This reverts commit r202420, which broke the build. llvm-svn: 202421
* Remove constructors from FileEntry that prevent owning resourcesBen Langmuir2014-02-271-48/+12
| | | | | | | | | | | | | This cleans up some constructors that would not be safe once FileEntry owns the storage for its name. These were already suspect, since they wouldn't work if the FileEntry had an open file descriptor. The only user for these constructors was in UniqueFileContainer, which wasn't a very useful abstraction anyway. So it and UniqueDirContainer have been replaced with std::map<UniqueID, *>. This change should not affect anything outside the FileManager. llvm-svn: 202420
* Split FileEntry name vs. isValidBen Langmuir2014-02-271-2/+3
| | | | | | | This is a small bit of refactoring in preparation for FileEntry owning the storage for its own name. llvm-svn: 202412
* [OPENMP] First changes for Parsing and Sema for 'omp simd' directive supportAlexey Bataev2014-02-271-0/+9
| | | | llvm-svn: 202360
* Add a 'use-external-names' option to VFS overlay filesBen Langmuir2014-02-271-15/+46
| | | | | | | | | | | | | | | | When true, sets the name of the file to be the name from 'external-contents'. Otherwise, you get the virtual path that the file was looked up by. This will not affect any non-virtual paths, or fully virtual paths (for which there is no reasonable 'external' name anyway). The setting is available globally, but can be overriden on a per-file basis. The goal is that this setting will control which path you see in debug info, diagnostics, etc. which are sensitive to which path is used. That will come in future patches that pass the name through to FileManager. llvm-svn: 202329
* Give sparcv9 the ability to set the target cpu. Change it from acceptingRoman Divacky2014-02-251-0/+16
| | | | | | | -march which doesnt exist on sparc gcc to -mcpu. While here adjust a few tests to not write an unused temporary file. llvm-svn: 202177
* Add a driver option -ivfsoverlayBen Langmuir2014-02-251-1/+1
| | | | | | | Reads the description of a virtual filesystem from a file and overlays it over the real file system. llvm-svn: 202176
* Add AArch64 big endian Target (aarch64_be)Christian Pirker2014-02-251-6/+49
| | | | llvm-svn: 202151
* Allow multi-component paths in VFS file nodesBen Langmuir2014-02-251-20/+31
| | | | | | | | | | | | | | | | This allows the 'name' field to contain a path, like { 'type': 'directory', 'name': '/path/to/dir', 'contents': [ ... ] } which not only simplifies reading and writing these files (for humans), but makes it possible to easily modify locations via textual replacement, which would not have worked in the old scheme. E.g. sed s:<ROOT>:<NEW ROOT> llvm-svn: 202109
* Pass through context for DiagHandler in VFSBen Langmuir2014-02-241-2/+5
| | | | | | | This allows the unit tests to not use global state when checking diagnostics. llvm-svn: 202072
* [AArch64] Change int64_t from 'long long int' to 'long int' for AArch64 target.Kevin Qin2014-02-241-0/+3
| | | | | | | | | | Most 64-bit targets define int64_t as long int, and AArch64 should make same definition to follow LP64 model. In GNU tool chain, int64_t is defined as long int for 64-bit target. So to get consistent with GNU, it's better Changing int64_t from 'long long int' to 'long int', otherwise clang will get different name mangling suffix compared with g++. llvm-svn: 202004
* Silence a warning from r201905Ben Langmuir2014-02-221-0/+1
| | | | | | | Avoid a warning about reaching the end of a non-void function after a covered switch. llvm-svn: 201919
* Add a VFSFromYAML class and a parser to create itBen Langmuir2014-02-211-4/+576
| | | | | | | | | | | | | | | 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
* [CMake] Get rid of explicit dependencies to include/clang/*.inc and ↵NAKAMURA Takumi2014-02-211-17/+0
| | | | | | | | | | | | | | | | | | | introduce CLANG_TABLEGEN_TARGETS. This does; - clang_tablegen() adds each tblgen'd target to global property CLANG_TABLEGEN_TARGETS as list. - List of targets is added to LLVM_COMMON_DEPENDS. - all clang libraries and targets depend on generated headers. You might wonder this would be regression, but in fact, this is little loss. - Almost all of clang libraries depend on tblgen'd files and clang-tblgen. - clang-tblgen may cause short stall-out but doesn't cause unconditional rebuild. - Each library's dependencies to tblgen'd files might vary along headers' structure. It made hard to track and update *really optimal* dependencies. Each dependency to intrinsics_gen and ClangSACheckers is left as DEPENDS. llvm-svn: 201842
* Fix gcc -Wparentheses warning.Patrik Hagglund2014-02-211-1/+1
| | | | llvm-svn: 201840
* Recommit virtual file systemBen Langmuir2014-02-204-73/+251
| | | | | | | | | | | Previously reverted in r201755 due to causing an assertion failure. I've removed the offending assertion, and taught the CompilerInstance to create a default virtual file system inside createFileManager. In the future, we should be able to reach into the CompilerInvocation to customize this behaviour without breaking clients that don't care. llvm-svn: 201818
* [mips] Make it impossible to have UnknownABI in CodeGen and Integrated ↵Daniel Sanders2014-02-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Assembler. Summary: This removes the need to coerce UnknownABI to the default ABI (O32 for MIPS32, N64 for MIPS64 [*]) in both MipsSubtarget and MipsAsmParser. Clang has been updated to disable both possible default ABI's before enabling the ABI it intends to use. [*] N64 being the default for MIPS64 is not actually correct. However N32 is not fully implemented/tested yet. Depends on: D2830 Reviewers: jacksprat, matheusalmeida Reviewed By: matheusalmeida Differential Revision: http://llvm-reviews.chandlerc.com/D2832 Differential Revision: http://llvm-reviews.chandlerc.com/D2846 llvm-svn: 201792
* Reverting the virtual file system implementation, because it triggers an ↵Juergen Ributzka2014-02-204-251/+73
| | | | | | | | | | assertion in our internal build bots. This reverts commits 201618, 201635, 201636, 201639, 201685, 201691, and 201696. llvm-svn: 201755
* Use llvm::DeleteContainerSeconds when possibleReid Kleckner2014-02-191-4/+1
| | | | llvm-svn: 201739
OpenPOWER on IntegriCloud