Commit Graph

166178 Commits

Author SHA1 Message Date
Alp Toker 17d4e98e73 Roll back the ConstStringRef change for now
There are a couple of interesting things here that we want to check over
(particularly the expecting asserts in StringRef) and get right for general use
in ADT so hold back on this one. For clang we have a workable templated
solution to use in the meanwhile.

This reverts commit r200187.

llvm-svn: 200194
2014-01-27 05:24:39 +00:00
Alp Toker 0d865d3d7b Roll back the use of ConstStringRef for now
We might want try a different strategy so hold back on this for the moment, but
fix the off-by-one error in the original function template.

This reverts commit r200190.

llvm-svn: 200193
2014-01-27 05:21:24 +00:00
Rafael Espindola 25fa291fb2 Print .mask and .fmask with the target streamer.
Testing this also found the missing '\n' after .frame that this patch also
fixes.

llvm-svn: 200192
2014-01-27 04:33:11 +00:00
Rui Ueyama 06dc5e79c6 Rename IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA.
editbin.exe and link.exe both accepts /highentropyva option to set this bit, so
doing s/VIRTUAL_ADDRESS/VA/ should make sense.

llvm-svn: 200191
2014-01-27 04:22:24 +00:00
Alp Toker a80501742c Use ConstStringRef facility for getCustomDiagID() safety
This is one of various functions in clang that don't handle arbitrary strings
well and can benefit from compile-time safety checks.

Also fixes an off-by-one error that caused one additional null byte to get
added to the end of custom diagnostic descriptions. ConstStringRef handles
tricky details like that for us now.

Requires supporting changes in LLVM r200187.

llvm-svn: 200190
2014-01-27 04:22:22 +00:00
Richard Smith 6a6a4bbdd4 PR17052 / DR1560 (+DR1550): In a conditional expression between a glvalue and a
throw-expression, the result is also a glvalue and isn't unnecessarily coerced
to a prvalue.

llvm-svn: 200189
2014-01-27 04:19:56 +00:00
Alp Toker 3bb1de7885 Move true/false StringRef helper to StringExtras
StringRef is a low-level data wrapper that shouldn't know about language
strings like 'true' and 'false' whereas StringExtras is just the place for
higher-level utilities.

llvm-svn: 200188
2014-01-27 04:07:36 +00:00
Alp Toker 042f41b047 StringRef: Extend constexpr capabilities and introduce ConstStringRef
(1) Add llvm_expect(), an asserting macro that can be evaluated as a constexpr
    expression as well as a runtime assert or compiler hint in release builds. This
    technique can be used to construct functions that are both unevaluated and
    compiled depending on usage.

(2) Update StringRef using llvm_expect() to preserve runtime assertions while
    extending the same checks to static asserts in C++11 builds that support the
    feature.

(3) Introduce ConstStringRef, a strong subclass of StringRef that references
    compile-time constant strings. It's convertible to, but not from, ordinary
    StringRef and thus can be used to add compile-time safety to various interfaces
    in LLVM and clang that only accept fixed inputs such as diagnostic format
    strings that tend to get misused.

llvm-svn: 200187
2014-01-27 04:07:17 +00:00
Rafael Espindola 054234faa8 Print .frame via the target streamer.
llvm-svn: 200186
2014-01-27 03:53:56 +00:00
Rui Ueyama b73d28525a [PECOFF] Implement relocations for x86-64.
llvm-svn: 200185
2014-01-27 03:53:30 +00:00
Rui Ueyama 7d1bf45047 [PECOFF] Fix PE/COFF optional header size for PE32+.
The optional header for PE32+ is a bit larger than PE32 because some of
its fields are extended to 8 bytes.

llvm-svn: 200184
2014-01-27 03:53:26 +00:00
Rui Ueyama f1a2d55e2b [PECOFF] Set a proper architecture type to references.
Relocations for x64 object files should have reference type of
KindArch::x86_64.

llvm-svn: 200183
2014-01-27 03:53:23 +00:00
Shankar Easwaran 3d8de47f76 Fix trailing whitespace.
llvm-svn: 200182
2014-01-27 03:09:26 +00:00
Shankar Easwaran a64ba010f0 [ELF] Fix comments.
The comments in the files that described the file name as part of each file
header ran over 80 columns, which clang-format split over multiple lines.

This commit fixes to make them appear properly.

llvm-svn: 200181
2014-01-27 02:55:08 +00:00
Kevin Qin 4a183d7094 [AArch64 NEON] Try to generate CONCAT_VECTOR when lowering BUILD_VECTOR or SHUFFLE_VECTOR.
Replace r199791.

llvm-svn: 200180
2014-01-27 02:53:54 +00:00
Kevin Qin 9eeedfbaa6 Revert r199791.
It's old version which has some bugs. I'll commit lattest patch soon.

llvm-svn: 200179
2014-01-27 02:53:41 +00:00
Rafael Espindola 2ab7ea7c1a Use SwitchSection in MipsAsmPrinter::EmitStartOfAsmFile.
llvm-svn: 200178
2014-01-27 01:33:33 +00:00
Shankar Easwaran b11964707c [ELF] Make changes to all the targets supported currently
X86_64,X86,PPC,Hexagon,Mips

No change in functionality.

llvm-svn: 200177
2014-01-27 01:21:02 +00:00
Shankar Easwaran af7fbd8cf4 [ELF] Create Target specific Writers.
llvm-svn: 200176
2014-01-27 01:20:53 +00:00
Shankar Easwaran e7b831ad35 [ELF] Add Target specific Readers.
No change in functionality.

llvm-svn: 200175
2014-01-27 01:02:03 +00:00
Rafael Espindola 51577b66ce Remove dead code.
llvm-svn: 200174
2014-01-27 00:47:51 +00:00
Shankar Easwaran d7de108cde [ELF] Separate ELFReader classes for subclassing
llvm-svn: 200173
2014-01-27 00:45:57 +00:00
Shankar Easwaran f755ca1685 [ELF] Unify interfaces between DynamicFile/ELFFile.
llvm-svn: 200172
2014-01-27 00:40:49 +00:00
Rafael Espindola 98f5b54f85 Add back spaces I missed in the conversion to emitRawComments.
Sorry about that.

llvm-svn: 200171
2014-01-27 00:19:41 +00:00
Rafael Espindola bcf890bf07 Use emitRawComment instead of EmitRawText.
llvm-svn: 200170
2014-01-27 00:16:00 +00:00
Rafael Espindola b7381560bc Add missing file.
llvm-svn: 200169
2014-01-27 00:08:17 +00:00
Shankar Easwaran f3db51d06f [ELF] Separate implementation from the class declaration.
ELFFile would be a class that rest of the targets would derive from.
To keep the implementation clean, separate the implementation from
rest of the Header file.

llvm-svn: 200168
2014-01-26 23:57:20 +00:00
Rafael Espindola fd5d129298 Add a XCoreTargetStreamer and port over the simple uses of EmitRawText.
llvm-svn: 200167
2014-01-26 23:57:05 +00:00
Shankar Easwaran 9691b01905 [ELF] Rename File.h to ELFFile.h to avoid confusion.
No change in functionality.

llvm-svn: 200166
2014-01-26 23:49:07 +00:00
Shankar Easwaran b888433e9c [ELF] Dont include all targets
llvm-svn: 200165
2014-01-26 23:47:18 +00:00
Evan Cheng 31dd9a6cc1 Fix r195149. Triple should correctly reflect that target. If it contains ios,
e.g. thumbv7m-apple-ios3.0.0-eabi, then it should mean it's an iOS target. For
embedded targets, the OS should be unknown, e.g. thumbv7m-apple-unknown-macho.
Since Tim has recently fixed the triple, r195149 is no longer needed.
rdar://15911035

llvm-svn: 200164
2014-01-26 23:12:43 +00:00
Saleem Abdulrasool f9352a3880 MC: fix test locations/name
Placed the MC variant diagnostics in the wrong directory accidentally.  Move
them into their respective architecture specific directories.

llvm-svn: 200161
2014-01-26 22:55:02 +00:00
Saleem Abdulrasool a903661289 ARM: improve diagnostics for .word directive
If a complex expression was passed to the .word directive and the first part of
the directive failed to parse, a secondary diagnostic would be produced that
would clutter the error diagnostics.  Improve the diagnostics by consuming the
remainder of the statement.

llvm-svn: 200160
2014-01-26 22:29:50 +00:00
Saleem Abdulrasool a25e1e4ebe AsmParser: improve diagnostics for invalid variants
An emitted diagnostic for an invalid relocation variant would place the caret on
the token following the relocation variant indicator or at the end of the line
if there was no following token.  This change corrects the placement of the
caret to point to the token.

llvm-svn: 200159
2014-01-26 22:29:43 +00:00
Saleem Abdulrasool 077fd251fd MC: whitespace
Fix indentation, remove unnecessary line.  NFC.

llvm-svn: 200158
2014-01-26 22:29:36 +00:00
Joerg Sonnenberger f19dc30518 Use canonical spelling of NetBSD
llvm-svn: 200157
2014-01-26 20:02:03 +00:00
Tobias Grosser b917f47fc4 Dependences: Bound the time dependence calculation is allowed to take
Count the number of computational steps that have been used to solve the
dependence problem and abort in case we reach the "compute-out". This ensures we
do not hang forever in cases the dependence problem is too difficult to solve.
There is just a single case in the LLVM test-suite that runs into the
compute-out. Even in this case, we can probably coalesce some of the parameters
(i32 b, i32 b zext i64, ...) to simplify the problem enough to not hit the
compute out. However, for now we set the compute out in place to address the
general issue. The compute out was choosen such that it stops on a recent laptop
after about 8 seconds.

llvm-svn: 200156
2014-01-26 19:38:34 +00:00
Tobias Grosser a38c92406c Update to isl 1b3ba3b72c0482fd36bf0b4a1186a259f7bafeed
This includes the following very useful isl commit:

commit d962967ab42323ea5ca0398956fbff6a98c782fa
Author: Sven Verdoolaege <skimo@kotnet.org>
Date:   Wed Dec 18 12:05:32 2013 +0100

allow the user to impose a bound on the number of low-level operations

This should allow the user to deterministically limit the effort spent on a
computation.

llvm-svn: 200155
2014-01-26 19:36:28 +00:00
Alp Toker 771f7652a9 Avoid C++ comment in C sources
lib/Target/X86/Disassembler/X86DisassemblerDecoder.c:1361:7: error: C++ style comments are not allowed in ISO C90

llvm-svn: 200153
2014-01-26 18:44:34 +00:00
Evan Cheng d89738c591 Follow up of r200095. Code clean up.
llvm-svn: 200152
2014-01-26 18:30:13 +00:00
NAKAMURA Takumi 4f82397a20 [CMake] tablegen(): Use -I <dir> according to the list by include_directories().
For now, local_tds and global_tds are integrated to dependent_tds.

llvm-svn: 200150
2014-01-26 12:41:38 +00:00
NAKAMURA Takumi 93d4cda2ca [CMake] Functionalize tblgen().
llvm-svn: 200149
2014-01-26 12:41:33 +00:00
NAKAMURA Takumi 298a161927 check-clang-tools: Also it doesn't require neither llvm_src_root nor llvm_obj_root.
llvm-svn: 200148
2014-01-26 12:40:18 +00:00
NAKAMURA Takumi d51b0aad70 clang-check: Unittests doesn't requires tools.
llvm-svn: 200147
2014-01-26 12:35:07 +00:00
NAKAMURA Takumi b80df40b1d check-clang doesn't require neither llvm_src_root nor llvm_obj_root.
llvm-svn: 200146
2014-01-26 12:35:00 +00:00
NAKAMURA Takumi 36ec246114 Revert r113780, "Recognize .ll as input files. Handle %test_debuginfo on a RUN command line."
This feature has been unused anymore.

llvm-svn: 200145
2014-01-26 12:34:54 +00:00
NAKAMURA Takumi 1a309679b8 [CMake] Always set CMAKE_INCLUDE_CURRENT_DIR.
llvm-svn: 200144
2014-01-26 12:34:48 +00:00
NAKAMURA Takumi 4080a2097b [CMake][Standalone] Introduce check-all.
llvm-svn: 200143
2014-01-26 12:34:38 +00:00
Alp Toker a143676664 Fix another invalid getCustomDiagID() use to unbreak the build
It was calling the utility wrapper that now requires a constant string
following clang r200132. The StringRef version on DiagnosticIDs appears to have
been what was intended so change to that.

llvm-svn: 200142
2014-01-26 08:36:03 +00:00
Jakob Stoklund Olesen 6f39ce4be2 Clean up the Legal/Expand logic for SPARC popc.
llvm-svn: 200141
2014-01-26 08:12:34 +00:00