Commit Graph

3764 Commits

Author SHA1 Message Date
Peter Collingbourne
85ea24d6da Support: Use a 64-bit seek in raw_fd_ostream::seek().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289184 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-09 04:57:19 +00:00
Chris Bieneman
746d96524f Fix the apple build issue caused by r288956
Should be checking if HAVE_CRASHREPORTERCLIENT_H is defined not relying on it having a value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288963 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 19:28:22 +00:00
Adrian Prantl
460dd60c1a [DIExpression] Introduce a dedicated DW_OP_LLVM_fragment operation
so we can stop using DW_OP_bit_piece with the wrong semantics.

The entire back story can be found here:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20161114/405934.html

The gist is that in LLVM we've been misinterpreting DW_OP_bit_piece's
offset field to mean the offset into the source variable rather than
the offset into the location at the top the DWARF expression stack. In
order to be able to fix this in a subsequent patch, this patch
introduces a dedicated DW_OP_LLVM_fragment operation with the
semantics that we used to apply to DW_OP_bit_piece, which is what we
actually need while inside of LLVM. This patch is complete with a
bitcode upgrade for expressions using the old format. It does not yet
fix the DWARF backend to use DW_OP_bit_piece correctly.

Implementation note: We discussed several options for implementing
this, including reserving a dedicated field in DIExpression for the
fragment size and offset, but using an custom operator at the end of
the expression works just fine and is more efficient because we then
only pay for it when we need it.

Differential Revision: https://reviews.llvm.org/D27361
rdar://problem/29335809

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288683 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05 18:04:47 +00:00
Ivan Krasin
8460d68f0a Support escaping in TrigramIndex.
Summary:
This is a follow up to r288303, where I have introduced TrigramIndex
to speed up SpecialCaseList for the cases when all rules are
simple wildcards, like *hello*wor.d*.

Here, I add support for escaping, so that it's possible to
specify rules like *c\+\+abi*.

Reviewers: pcc

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D27318

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288553 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 23:30:16 +00:00
Ivan Krasin
c22ac1df07 Use trigrams to speed up SpecialCaseList.
Summary:
it's often the case when the rules in the SpecialCaseList
are of the form hel.o*bar. That gives us a chance to build
trigram index to quickly discard 99% of inputs without
running a full regex. A similar idea was used in Google Code Search
as described in the blog post:
https://swtch.com/~rsc/regexp/regexp4.html

The check is defeated, if there's at least one regex
more complicated than that. In this case, all inputs
will go through the regex. That said, the real-world
rules are often simple or can be simplied. That considerably
speeds up compiling Chromium with CFI and UBSan.

As measured on Chromium's content_message_generator.cc:

before, CFI: 44 s
after, CFI: 23 s
after, CFI, no blacklist: 23 s (~1% slower, but 3 runs were unable to show the difference)
after, regular compilation to bitcode: 23 s

Reviewers: pcc

Subscribers: mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D27188

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288303 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 02:54:54 +00:00
Derek Schuff
7a578c9156 [WebAssembly] Add llvm-objdump support for wasm file format
This is the first part of an effort to add wasm binary
support across all llvm tools.

Patch by Sam Clegg

Differential Revision: https://reviews.llvm.org/D26172

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288251 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 16:49:11 +00:00
Pavel Labath
731473a9e8 [Support] Use HAVE_DLOPEN to guard dlopen(3) usage
Summary:
The usage was previously guarded by HAVE_DLFCN. This breaks on Android with
LLVM_BUILD_STATIC as the platform does not provide a static version of libdl.
Using HAVE_DLOPEN fixes it as the code will only get used if we are actually able
to link an executable using dlopen.

Reviewers: rafael, beanz

Subscribers: tberghammer, danalbert, llvm-commits

Differential Revision: https://reviews.llvm.org/D26504

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288246 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 15:34:29 +00:00
Benjamin Kramer
bf60ce0ebd Apply clang-tidy's 'performance-faster-string-find' check to LLVM.
No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288235 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 10:01:11 +00:00
NAKAMURA Takumi
f33188e05e Fix a linefeed at eof.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288167 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 17:32:43 +00:00
Mehdi Amini
7b6b980178 Add link-time detection of LLVM_ABI_BREAKING_CHECKS mismatch
The macro LLVM_ENABLE_ABI_BREAKING_CHECKS is moved to a new header
abi-breaking.h, from llvm-config.h. Only headers that are using the
macro are including this new header.

LLVM will define a symbol, either EnableABIBreakingChecks or
DisableABIBreakingChecks depending on the configuration setting for
LLVM_ABI_BREAKING_CHECKS.

The abi-breaking.h header will add weak references to these symbols in
every clients that includes this header. This should ensure that
a mismatch triggers a link failure (or a load time failure for DSO).

On MSVC, the pragma "detect_mismatch" is used instead.

Differential Revision: https://reviews.llvm.org/D26876

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288082 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-28 22:23:53 +00:00
Mehdi Amini
b54cba4a12 Improve error handling in YAML parsing
Some scanner errors were not checked and reported by the parser.

Fix PR30934. Recommit r288014 after fixing unittest.

Patch by: Serge Guelton <serge.guelton@telecom-bretagne.eu>

Differential Revision: https://reviews.llvm.org/D26419

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288071 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-28 21:38:52 +00:00
Davide Italiano
6f0da3f936 [ThreadPool] Rollback recent changes until I figure out the breakage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288018 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-28 09:17:12 +00:00
Davide Italiano
9bb8d18237 [ThreadPool] Simplify the interface. NFCI.
The callers don't use the return value. Found by Michael
Spencer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288016 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-28 08:53:41 +00:00
Mehdi Amini
9fdd2a607c Revert "Improve error handling in YAML parsing"
This reverts commit r288014, the unittest isn't passing

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288015 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-28 04:57:04 +00:00
Mehdi Amini
8db10dd160 Improve error handling in YAML parsing
Some scanner errors were not checked and reported by the parser.

Fix PR30934

Patch by: Serge Guelton <serge.guelton@telecom-bretagne.eu>

Differential Revision: https://reviews.llvm.org/D26419

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288014 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-28 04:44:13 +00:00
Daniel Berlin
c293e51672 Revert "[Triple] Add Facebook vendor"
This reverts commit r287684

Objections on the review thread had not been addressed to
prior to commit.  I asked the committer to revert, but i expect they
are gone for the US holiday or something.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287798 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 19:03:54 +00:00
Benjamin Kramer
e776d6005b [MD5] Use write32le instead of spelling it out with shifts.
No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287757 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 11:49:28 +00:00
Rui Ueyama
74e176a884 Fix builbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287735 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 03:58:12 +00:00
Rui Ueyama
6356463f9a Add convenient functions to compute hashes of byte vectors.
In many sitautions, you just want to compute a hash for one chunk
of data. This patch adds convenient functions for that purpose.

Differential Revision: https://reviews.llvm.org/D26988

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287726 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 00:46:09 +00:00
Shoaib Meenai
d0843bfa3b [Triple] Add Facebook vendor
Add a compiler vendor for Facebook, to enable future vendor-specific
behavior.

Differential Revision: https://reviews.llvm.org/D25136

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287684 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-22 19:36:26 +00:00
Simon Pilgrim
84d1e9104a Fix comment typos. NFC.
Identified by Pedro Giffuni in PR27636.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287490 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-20 13:47:59 +00:00
Serge Pavlov
15f7935637 Fix file name resolution in nested response files
If a response file in construct `@file` was specified by relative name,
constructs `@file` nested within it were resolved incorrectly if the
flag RelativeNames in call to ExpandResponseFile was set to true.
This feature is used in configuration files, tests for it are in
respective change (see D24933).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287482 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-20 06:25:07 +00:00
Rui Ueyama
b665150021 Attempt to fix big-endian buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287476 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-20 01:41:28 +00:00
Rui Ueyama
533eaeefec Style fix. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287475 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-20 01:15:56 +00:00
Rui Ueyama
54ac8bee97 Fix buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287474 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-20 01:13:22 +00:00
Rui Ueyama
8afc3ea3bd SHA1: unroll loop in hashBlock.
This code is taken from public domain.
https://github.com/jsonn/src/blob/trunk/common/lib/libc/hash/sha1/sha1.c

I wrote a sha1 command and ran it on my Xeon E5-2680 v2 2.80GHz machine.
Here is a result. The new hash function is 37% faster than before.

 Performance counter stats for './llvm-sha1-old /ssd/build/bin/lld' (10 runs):

       6640.503687 task-clock (msec)         #    1.001 CPUs utilized            ( +-  0.03% )
                54 context-switches          #    0.008 K/sec                    ( +-  5.03% )
                 5 cpu-migrations            #    0.001 K/sec                    ( +- 31.73% )
           183,803 page-faults               #    0.028 M/sec                    ( +-  0.00% )
    18,527,954,113 cycles                    #    2.790 GHz                      ( +-  0.03% )
     4,993,237,485 stalled-cycles-frontend   #   26.95% frontend cycles idle     ( +-  0.11% )
   <not supported> stalled-cycles-backend
    50,217,149,423 instructions              #    2.71  insns per cycle
                                             #    0.10  stalled cycles per insn  ( +-  0.00% )
     6,094,322,337 branches                  #  917.750 M/sec                    ( +-  0.00% )
        11,778,239 branch-misses             #    0.19% of all branches          ( +-  0.01% )

       6.634017401 seconds time elapsed                                          ( +-  0.03% )

 Performance counter stats for './llvm-sha1-new /ssd/build/bin/lld' (10 runs):

       4167.062720 task-clock (msec)         #    1.001 CPUs utilized            ( +-  0.02% )
                52 context-switches          #    0.012 K/sec                    ( +- 16.45% )
                 7 cpu-migrations            #    0.002 K/sec                    ( +- 32.20% )
           183,804 page-faults               #    0.044 M/sec                    ( +-  0.00% )
    11,626,611,958 cycles                    #    2.790 GHz                      ( +-  0.02% )
     4,491,897,976 stalled-cycles-frontend   #   38.63% frontend cycles idle     ( +-  0.05% )
   <not supported> stalled-cycles-backend
    24,320,180,617 instructions              #    2.09  insns per cycle
                                             #    0.18  stalled cycles per insn  ( +-  0.00% )
     1,574,674,576 branches                  #  377.886 M/sec                    ( +-  0.00% )
        11,769,693 branch-misses             #    0.75% of all branches          ( +-  0.00% )

       4.163251552 seconds time elapsed                                          ( +-  0.02% )

Differential Revision: https://reviews.llvm.org/D26890

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287473 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-20 01:03:22 +00:00
Mehdi Amini
c0aec7f2f5 Revert "Add link-time detection of LLVM_ABI_BREAKING_CHECKS mismatch"
This reverts commit r287352, LLDB CI is broken.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287374 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 20:02:34 +00:00
Matthias Braun
9df5d1c65c Statistic/Timer: Include timers in PrintStatisticsJSON().
Differential Revision: https://reviews.llvm.org/D25588

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287370 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 19:43:24 +00:00
Matthias Braun
9262f00f1a Timer: Track name and description.
The previously used "names" are rather descriptions (they use multiple
words and contain spaces), use short programming language identifier
like strings for the "names" which should be used when exporting to
machine parseable formats.

Also removed a unused TimerGroup from Hexxagon.

Differential Revision: https://reviews.llvm.org/D25583

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287369 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 19:43:18 +00:00
Mehdi Amini
ed72617844 Add link-time detection of LLVM_ABI_BREAKING_CHECKS mismatch
Summary:
LLVM will define a symbol, either EnableABIBreakingChecks or
DisableABIBreakingChecks depending on the configuration setting for
LLVM_ABI_BREAKING_CHECKS.

The llvm-config.h header will add weak references to these symbols in
every clients that includes this header. This should ensure that
a mismatch triggers a link failure (or a load time failure for DSO).

On MSVC, the pragma "detect_mismatch" is used instead.

Reviewers: rnk, jroelofs

Subscribers: llvm-commits, mgorny

Differential Revision: https://reviews.llvm.org/D26841

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287352 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 17:28:10 +00:00
Pekka Jaaskelainen
744fcd8986 Add a little endian variant of TCE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287111 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-16 15:22:23 +00:00
Pavel Labath
a33f3dffef Remove TimeValue class
Summary:
All uses have been replaced by appropriate std::chrono types, and the class is
now unused.

Reviewers: zturner, mehdi_amini

Subscribers: llvm-commits, mgorny

Differential Revision: https://reviews.llvm.org/D26447

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287094 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-16 10:46:48 +00:00
Rui Ueyama
d7ba4fc63c Simplify identify_magic.
This patch defines a memcmp-ish helper function to simplify identify_magic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286928 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-15 01:57:05 +00:00
Rui Ueyama
baf920c9bc Add a file magic for CL.exe's object file created with /GL.
This patch makes it possible to identify object files created by CL.exe
with /GL option. Such file contains Microsoft proprietary intermediate
code instead of target machine code to do LTO.

I need this to print out user-friendly error message from LLD.

Differential Revision: https://reviews.llvm.org/D26645

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286919 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-15 00:54:54 +00:00
Bob Wilson
63165f6ae3 Use _Unwind_Backtrace on Apple platforms.
Darwin's backtrace() function does not work with sigaltstack (which was
enabled when available with r270395) — it does a sanity check to make
sure that the current frame pointer is within the expected stack area
(which it is not when using an alternate stack) and gives up otherwise.
The alternative of _Unwind_Backtrace seems to work fine on macOS, so use
that when backtrace() fails. Note that we then use backtrace_symbols_fd()
with the addresses from _Unwind_Backtrace, but I’ve tested that and it
also seems to work fine. rdar://problem/28646552

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286851 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-14 17:56:18 +00:00
Zachary Turner
fd3428261b [Support] Add StringRef::find_lower and contains_lower.
Differential Revision: https://reviews.llvm.org/D25299

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286724 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 17:17:12 +00:00
Zachary Turner
97dac2b41d [Support] Introduce llvm::formatv() function.
This introduces a new type-safe general purpose formatting
library.  It provides compile-time type safety, does not require
a format specifier (since the type is deduced), and provides
mechanisms for extending the format capability to user defined
types, and overriding the formatting behavior for existing types.

This patch additionally adds documentation for the API to the
LLVM programmer's manual.

Mailing List Thread:
http://lists.llvm.org/pipermail/llvm-dev/2016-October/105836.html

Differential Revision: https://reviews.llvm.org/D25587

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286682 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 23:57:40 +00:00
Matthias Braun
a46113773f Timer: Remove group-less NamedRegionTimer constructor.
The NamedRegionTimer initializer without a group name puts the Timer
into the "Misc" group and is (nearly) unused. Remove it.

The only user of this constructor appears to be the HexagonGenInsert pass,
which creates a counter without group to count the complete execution
time of that pass, however since every pass gets a counter by the
PassManager anyway this should be unnecessary. Also removed the
pointless TimerGroup there.

Differential Revision: https://reviews.llvm.org/D25582

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286524 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-10 23:36:44 +00:00
Zachary Turner
a6269f0326 Fix type ambiguity with std::max
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286498 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-10 20:35:21 +00:00
Zachary Turner
48fbf5cc1a [Support] Improve flexibility of binary blob formatter.
This makes it possible to indent a binary blob by a certain
number of bytes, and also makes some things more idiomatic.
Finally, it integrates this binary blob formatter into ScopedPrinter
which used to have its own implementation of this algorithm.

Differential Revision: https://reviews.llvm.org/D26477

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286495 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-10 20:16:45 +00:00
Pavel Labath
517cd170c3 Zero-initialize chrono duration objects
The default duration constructor does not zero-initialize the object, we need to
do that manually.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286359 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-09 11:43:57 +00:00
Greg Clayton
a20694002c Added the ability to dump hex bytes easily into a raw_ostream.
Unit tests were added to verify this functionality keeps working correctly.

Example output for raw hex bytes:
llvm::ArrayRef<uint8_t> Bytes = ...;
llvm::outs() << format_hex_bytes(Bytes);
554889e5 4881ec70 04000048 8d051002
00004c8d 05fd0100 004c8b0d d0020000

Example output for raw hex bytes with offsets:
llvm::outs() << format_hex_bytes(Bytes, 0x100000d10);
0x0000000100000d10: 554889e5 4881ec70 04000048 8d051002
0x0000000100000d20: 00004c8d 05fd0100 004c8b0d d0020000

Example output for raw hex bytes with ASCII with offsets:
llvm::outs() << format_hex_bytes_with_ascii(Bytes, 0x100000d10);
0x0000000100000d10: 554889e5 4881ec70 04000048 8d051002 |UH.?H.?p...H....|
0x0000000100000d20: 00004c8d 05fd0100 004c8b0d d0020000 |..L..?...L..?...|

The default groups bytes into 4 byte groups, but this can be changed to 1 byte:
llvm::outs() << format_hex_bytes(Bytes, 0x100000d10, 16 /*NumPerLine*/, 1 /*ByteGroupSize*/);
0x0000000100000d10: 55 48 89 e5 48 81 ec 70 04 00 00 48 8d 05 10 02
0x0000000100000d20: 00 00 4c 8d 05 fd 01 00 00 4c 8b 0d d0 02 00 00

llvm::outs() << format_hex_bytes(Bytes, 0x100000d10, 16 /*NumPerLine*/, 2 /*ByteGroupSize*/);
0x0000000100000d10: 5548 89e5 4881 ec70 0400 0048 8d05 1002
0x0000000100000d20: 0000 4c8d 05fd 0100 004c 8b0d d002 0000

llvm::outs() << format_hex_bytes(Bytes, 0x100000d10, 8 /*NumPerLine*/, 1 /*ByteGroupSize*/);
0x0000000100000d10: 55 48 89 e5 48 81 ec 70
0x0000000100000d18: 04 00 00 48 8d 05 10 02
0x0000000100000d20: 00 00 4c 8d 05 fd 01 00
0x0000000100000d28: 00 4c 8b 0d d0 02 00 00

https://reviews.llvm.org/D26405



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286316 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-09 00:15:54 +00:00
Sylvestre Ledru
20b341aa05 Fix memory leaks (coverity issues 1365586 & 1365591)
Reviewers: hfinkel

Subscribers: george.burgess.iv, malcolm.parsons, boris.ulasevich, llvm-commits

Differential Revision: https://reviews.llvm.org/D26347

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286223 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-08 10:00:45 +00:00
Tim Shen
c7524ad33d [APFloat] Make functions that produce APFloaat objects use correct semantics.
Summary:
Fixes PR30869.

In D25977 I meant to change all functions that care about lifetime. I
changed constructors, factory functions, but I missed member/free
functions that return new instances. This patch changes them.

Reviewers: hfinkel, kbarton, echristo, joerg

Subscribers: llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D26269

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286060 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-06 07:38:37 +00:00
Alina Sbirlea
1aa9c9ac56 Correct mprotect page boundries to round up end page. Fixes PR30905.
Summary:
Update the boundries for mprotect.
Patch by Andrew Adams. Fixes PR30905.

Reviewers: loladiro, andrew.w.kaylor, chandlerc

Subscribers: abadams, llvm-commits

Differential Revision: https://reviews.llvm.org/D26312

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286032 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-05 04:22:15 +00:00
Peter Collingbourne
4ac35e8272 Support: Remove MemoryObject and DataStreamer interfaces.
These interfaces are no longer used.

Differential Revision: https://reviews.llvm.org/D26222

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285774 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-02 00:08:37 +00:00
Alex Bradbury
404c9d53b5 [RISCV] Recognise riscv32 and riscv64 in triple parsing code
This is the first in a series of 10 initial patches that incrementally add an 
MC layer for RISC-V to LLVM. See 
<http://lists.llvm.org/pipermail/llvm-dev/2016-August/103748.html> for more 
discussion.

Differential Revision: https://reviews.llvm.org/D23557


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285707 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-01 16:47:54 +00:00
Serge Pavlov
038b68a6a3 Allow resolving response file names relative to including file
If a response file included by construct @file itself includes a response file
and that file is specified by relative file name, current behavior is to resolve
the name relative to the current working directory. The change adds additional
flag to ExpandResponseFiles that may be used to resolve nested response file
names relative to including file. With the new mode a set of related response
files may be kept together and reference each other with short position
independent names.

Differential Revision: https://reviews.llvm.org/D24917


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285675 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-01 06:53:29 +00:00
NAKAMURA Takumi
37111b28b6 NativeFormatting.cpp: Fix build for mingw. Where would writePadding() be?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285509 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-29 23:14:18 +00:00
Tim Shen
b7f36bcf55 [APFloat] Remove the redundent function body of uninitialized ctor, which should be done in r285468
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285486 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-29 00:51:41 +00:00