platform/upstream/llvm.git
11 years agoPR9992: Serialize and deserialize the token sequence for a function template in
Richard Smith [Wed, 7 Aug 2013 21:41:30 +0000 (21:41 +0000)]
PR9992: Serialize and deserialize the token sequence for a function template in
-fdelayed-template-parsing mode. Patch by Will Wilson!

llvm-svn: 187916

11 years agoN3644 support for <unordered_set> and <unordered_map>
Marshall Clow [Wed, 7 Aug 2013 21:30:44 +0000 (21:30 +0000)]
N3644 support for <unordered_set> and <unordered_map>

llvm-svn: 187915

11 years ago[PCH] Fix a PCH serialization crash, with invalid code related to forward enum refere...
Argyrios Kyrtzidis [Wed, 7 Aug 2013 21:17:33 +0000 (21:17 +0000)]
[PCH] Fix a PCH serialization crash, with invalid code related to forward enum references.

The problem was that an enum without closing semicolon could be associated as a forward enum
in an erroneous declaration, leading to the identifier being associated with the enum decl but
without a declaration actually referencing it.
This resulted in not having it serialized before serializing the identifier that is associated with.

Also prevent the ASTUnit from querying the serialized DeclID for an invalid top-level decl; it may not
have been serialized.

rdar://14539667

llvm-svn: 187914

11 years agoUsing the integrated assembler we'd fail to change section to the
Eric Christopher [Wed, 7 Aug 2013 21:13:06 +0000 (21:13 +0000)]
Using the integrated assembler we'd fail to change section to the
.tbss section for zerofill thread locals. Make sure we do this
before emitting the zerofills.

Fixes PR15972.

llvm-svn: 187913

11 years agoFix a FIXME, on darwin all virtual sections have a zerofill type.
Eric Christopher [Wed, 7 Aug 2013 21:13:01 +0000 (21:13 +0000)]
Fix a FIXME, on darwin all virtual sections have a zerofill type.

llvm-svn: 187912

11 years agoN3644 support for vector<bool>
Marshall Clow [Wed, 7 Aug 2013 20:53:44 +0000 (20:53 +0000)]
N3644 support for vector<bool>

llvm-svn: 187911

11 years agoN3644 support for vector<bool>
Marshall Clow [Wed, 7 Aug 2013 20:53:38 +0000 (20:53 +0000)]
N3644 support for vector<bool>

llvm-svn: 187910

11 years agoN3644 support for <string> and <vector>
Marshall Clow [Wed, 7 Aug 2013 20:48:48 +0000 (20:48 +0000)]
N3644 support for <string> and <vector>

llvm-svn: 187909

11 years agoCorrect logic bug in find optimization for vector<bool>. This fixes http://llvm...
Howard Hinnant [Wed, 7 Aug 2013 20:42:16 +0000 (20:42 +0000)]
Correct logic bug in find optimization for vector<bool>.  This fixes llvm.org/bugs/show_bug.cgi?id=16816

llvm-svn: 187908

11 years agoOn Windows, autolink advapi32 from Path.inc for CryptAcquireContextW
Reid Kleckner [Wed, 7 Aug 2013 20:19:31 +0000 (20:19 +0000)]
On Windows, autolink advapi32 from Path.inc for CryptAcquireContextW

This allows llvm-tblgen to link successfully when compiling with clang.

Both MSBuild and CMake will automatically add advapi32 as part of a set
of other dlls comprising the win32 API to the link line, but CMake
doesn't do that when compiling with clang.  Until someone adds that info
to cmake upstream, this seems like a reasonable work around.

llvm-svn: 187907

11 years agoWar on tabs
Howard Hinnant [Wed, 7 Aug 2013 19:39:48 +0000 (19:39 +0000)]
War on tabs

llvm-svn: 187906

11 years agoRename time.duration.literals step 3
Howard Hinnant [Wed, 7 Aug 2013 19:39:11 +0000 (19:39 +0000)]
Rename time.duration.literals step 3

llvm-svn: 187905

11 years agoRename time.duration.literals step 2
Howard Hinnant [Wed, 7 Aug 2013 19:36:50 +0000 (19:36 +0000)]
Rename time.duration.literals step 2

llvm-svn: 187904

11 years agoRename time.duration.literals step 1
Howard Hinnant [Wed, 7 Aug 2013 19:35:46 +0000 (19:35 +0000)]
Rename time.duration.literals step 1

llvm-svn: 187903

11 years agoAdd the common begin/end naming convention to the coding standard.
Rafael Espindola [Wed, 7 Aug 2013 19:34:37 +0000 (19:34 +0000)]
Add the common begin/end naming convention to the coding standard.

llvm-svn: 187902

11 years agoFixes a couple of bugs with the Allman brace breaking.
Manuel Klimek [Wed, 7 Aug 2013 19:20:45 +0000 (19:20 +0000)]
Fixes a couple of bugs with the Allman brace breaking.

In particular, left braces after an enum declaration now occur on their
own line.  Further, when short ifs/whiles are allowed these no longer
cause the left brace to be on the same line as the if/while when a
brace is included.

Patch by Thomas Gibson-Robinson.

llvm-svn: 187901

11 years agoclean up about 22 warnings messages
Michael Sartain [Wed, 7 Aug 2013 19:05:15 +0000 (19:05 +0000)]
clean up about 22 warnings messages

llvm-svn: 187900

11 years agoMove assert above first use of variable that we'd be asserting on.
Eric Christopher [Wed, 7 Aug 2013 18:51:09 +0000 (18:51 +0000)]
Move assert above first use of variable that we'd be asserting on.

llvm-svn: 187899

11 years agoFixed incorrect header guard/nested header mechanism.
John Thompson [Wed, 7 Aug 2013 18:49:47 +0000 (18:49 +0000)]
Fixed incorrect header guard/nested header mechanism.

llvm-svn: 187898

11 years agoCorrectly allign arrays on 32 bit systems.
Rafael Espindola [Wed, 7 Aug 2013 18:08:19 +0000 (18:08 +0000)]
Correctly allign arrays on 32 bit systems.

Before this patch we would align

long long int big[1024];

to 4 bytes on 32 bit systems. The problem is that we were only looking
at the element type when getLargeArrayMinWidth returned non zero.

llvm-svn: 187897

11 years agolit/LitConfig.py: Fixup for msys bash.
NAKAMURA Takumi [Wed, 7 Aug 2013 17:21:23 +0000 (17:21 +0000)]
lit/LitConfig.py: Fixup for msys bash.

llvm-svn: 187896

11 years agoConfusing comment typo.
Andrew Trick [Wed, 7 Aug 2013 17:20:32 +0000 (17:20 +0000)]
Confusing comment typo.

llvm-svn: 187895

11 years agoPatch to fix doxygen trailing comments for ObjectiveC methods.
Fariborz Jahanian [Wed, 7 Aug 2013 16:40:29 +0000 (16:40 +0000)]
Patch to fix doxygen trailing comments for ObjectiveC methods.
// rdar://14258334

llvm-svn: 187893

11 years agoclang-format: Fix corner case in OpenMP pragma formatting.
Daniel Jasper [Wed, 7 Aug 2013 16:29:23 +0000 (16:29 +0000)]
clang-format: Fix corner case in OpenMP pragma formatting.

Before:
  #pragma omp reduction( | : var)
After:
  #pragma omp reduction(| : var)

llvm-svn: 187892

11 years agoEliminate CXXConstructorDecl::IsImplicitlyDefined.
Jordan Rose [Wed, 7 Aug 2013 16:16:48 +0000 (16:16 +0000)]
Eliminate CXXConstructorDecl::IsImplicitlyDefined.

This field is just IsDefaulted && !IsDeleted; in all places it's used,
a simple check for isDefaulted() is superior anyway, and we were forgetting
to set it in a few cases.

Also eliminate CXXDestructorDecl::IsImplicitlyDefined, for the same reasons.

No intended functionality change.

llvm-svn: 187891

11 years agoRe-enable check previously disabled due to llvm.org/pr16603
Daniel Malea [Wed, 7 Aug 2013 15:21:08 +0000 (15:21 +0000)]
Re-enable check previously disabled due to llvm.org/pr16603

llvm-svn: 187890

11 years ago[TSan] Fix free_race.c by removing `not` from the test invocation that doesn't fail.
Alexander Potapenko [Wed, 7 Aug 2013 13:54:27 +0000 (13:54 +0000)]
[TSan] Fix free_race.c by removing `not` from the test invocation that doesn't fail.

llvm-svn: 187889

11 years agoIndicate success for simple options when clang called with -cc1.
Rafael Espindola [Wed, 7 Aug 2013 12:54:47 +0000 (12:54 +0000)]
Indicate success for simple options when clang called with -cc1.

Patch by David Wiberg.

llvm-svn: 187888

11 years agoLit: Fixup in r187886.
NAKAMURA Takumi [Wed, 7 Aug 2013 12:53:53 +0000 (12:53 +0000)]
Lit: Fixup in r187886.

llvm-svn: 187887

11 years agoLit: Resurrect --no-execute dropped in r187852.
NAKAMURA Takumi [Wed, 7 Aug 2013 12:44:29 +0000 (12:44 +0000)]
Lit: Resurrect --no-execute dropped in r187852.

For now, builders in bb.pgr.jp are using it.

llvm-svn: 187886

11 years ago[TSan] Let the users suppress use-after-free errors using the "race:" suppressions.
Alexander Potapenko [Wed, 7 Aug 2013 12:39:00 +0000 (12:39 +0000)]
[TSan] Let the users suppress use-after-free errors using the "race:" suppressions.

If there's a race between a memory access and a free() call in the client program,
it can be reported as a use-after-free (if the access occurs after the free()) or an ordinary race
(if free() occurs after the access).
We've decided to use a single "race:" prefix for both cases instead of introducing a "use-after-free:" one,
because in many cases this allows us to keep a single suppression for both the use-after-free and free-after-use.

This may be misleading if the use-after-free occurs in a non-racy way (e.g. in a single-threaded program).
But normally such bugs shall not be suppressed.

llvm-svn: 187885

11 years agoAVX-512 set: Added BROADCAST instructions
Elena Demikhovsky [Wed, 7 Aug 2013 12:34:55 +0000 (12:34 +0000)]
AVX-512 set: Added BROADCAST instructions
with lowering logic and a test.

llvm-svn: 187884

11 years ago[SystemZ] Optimize floating-point comparisons with zero
Richard Sandiford [Wed, 7 Aug 2013 11:10:06 +0000 (11:10 +0000)]
[SystemZ] Optimize floating-point comparisons with zero

This follows the same lines as the integer code.  In the end it seemed
easier to have a second 4-bit mask in TSFlags to specify the compare-like
CC values.  That eats one more TSFlags bit than adding a CCHasUnordered
would have done, but it feels more concise.

llvm-svn: 187883

11 years ago[SystemZ] Add floating-point load-and-test instructions
Richard Sandiford [Wed, 7 Aug 2013 11:03:34 +0000 (11:03 +0000)]
[SystemZ] Add floating-point load-and-test instructions

These instructions can also be used as comparisons with zero.

llvm-svn: 187882

11 years agoASan: fix one more test case for pipefail
Alexey Samsonov [Wed, 7 Aug 2013 10:41:49 +0000 (10:41 +0000)]
ASan: fix one more test case for pipefail

llvm-svn: 187881

11 years agoJumpThreading: Turn a select instruction into branching if it allows to thread one...
Benjamin Kramer [Wed, 7 Aug 2013 10:29:38 +0000 (10:29 +0000)]
JumpThreading: Turn a select instruction into branching if it allows to thread one half of the select.

This is a common pattern coming out of simplifycfg generating gross code.

a:                                       ; preds = %entry
  %sel = select i1 %cmp1, double %add, double 0.000000e+00
  br label %b

b:
  %cond5 = phi double [ %sel, %a ], [ %sub, %entry ]
  %cmp6 = fcmp oeq double %cond5, 0.000000e+00
  br i1 %cmp6, label %if.then, label %if.end

becomes

a:
  br i1 %cmp1, label %b, label %if.then

b:
  %cond5 = phi double [ %sub, %entry ], [ %add, %a ]
  %cmp6 = fcmp oeq double %cond5, 0.000000e+00
  br i1 %cmp6, label %if.then, label %if.end

Skipping block b completely if possible.

llvm-svn: 187880

11 years agoCommit a no-op change to StringRef to (hopefully) trigger build bots.
Chandler Carruth [Wed, 7 Aug 2013 09:52:34 +0000 (09:52 +0000)]
Commit a no-op change to StringRef to (hopefully) trigger build bots.
r187874 seems to have been missed by the build bot infrastructure, and
the subsequent commits to compiler-rt don't seem to be queuing up new
build requsets. Hopefully this will.

As it happens, having the space here is the more common formatting. =]

llvm-svn: 187879

11 years agoDistinguish 32-bit ASan from 64-bit ASan in lit configs
Alexey Samsonov [Wed, 7 Aug 2013 09:31:28 +0000 (09:31 +0000)]
Distinguish 32-bit ASan from 64-bit ASan in lit configs

llvm-svn: 187878

11 years agoEnable pipefail for ASan tests
Alexey Samsonov [Wed, 7 Aug 2013 09:14:30 +0000 (09:14 +0000)]
Enable pipefail for ASan tests

llvm-svn: 187877

11 years ago[sanitizer] Intercept sched_getaffinity.
Evgeniy Stepanov [Wed, 7 Aug 2013 09:10:16 +0000 (09:10 +0000)]
[sanitizer] Intercept sched_getaffinity.

Re-applying with a more reliable test case.

llvm-svn: 187876

11 years agoEnable pipefail for TSan tests
Alexey Samsonov [Wed, 7 Aug 2013 09:02:37 +0000 (09:02 +0000)]
Enable pipefail for TSan tests

llvm-svn: 187875

11 years agoAdd support for linking against a curses library when available and
Chandler Carruth [Wed, 7 Aug 2013 08:47:36 +0000 (08:47 +0000)]
Add support for linking against a curses library when available and
using it to detect whether or not a terminal supports colors. This
replaces a particularly egregious hack that merely compared the TERM
environment variable to "dumb". That doesn't really translate to
a reasonable experience for users that have actually ensured their
terminal's capabilities are accurately reflected.

This makes testing a terminal for color support somewhat more expensive,
but it is called very rarely anyways. The important fast path when the
output is being piped somewhere is already in place.

The global lock may seem excessive, but the spec for calling into curses
is *terrible*. The whole library is terrible, and I spent quite a bit of
time looking for a better way of doing this before convincing myself
that this was the fundamentally correct way to behave. The damage of the
curses library is very narrowly confined, and we continue to use raw
escape codes for actually manipulating the colors which is a much sane
system than directly using curses here (IMO).

If this causes trouble for folks, please let me know. I've tested it on
Linux and will watch the bots carefully. I've also worked to account for
the variances of curses interfaces that I could finde documentation for,
but that may not have been sufficient.

llvm-svn: 187874

11 years agoEnable pipefail for LSan tests
Alexey Samsonov [Wed, 7 Aug 2013 08:46:09 +0000 (08:46 +0000)]
Enable pipefail for LSan tests

llvm-svn: 187873

11 years agoRemove some parens. No functional change.
Eric Christopher [Wed, 7 Aug 2013 08:35:10 +0000 (08:35 +0000)]
Remove some parens. No functional change.

llvm-svn: 187872

11 years agoDocumentation for sanitizer special case list format and -f(no-)?sanitize-blacklist...
Alexey Samsonov [Wed, 7 Aug 2013 08:23:32 +0000 (08:23 +0000)]
Documentation for sanitizer special case list format and -f(no-)?sanitize-blacklist flag

llvm-svn: 187871

11 years agoSimplify code. No functional change intended.
Craig Topper [Wed, 7 Aug 2013 08:16:07 +0000 (08:16 +0000)]
Simplify code. No functional change intended.

llvm-svn: 187870

11 years agoInitialize SIInsertWaits::ExpInstrTypesSeen in the pass constructor.
Evgeniy Stepanov [Wed, 7 Aug 2013 07:47:41 +0000 (07:47 +0000)]
Initialize SIInsertWaits::ExpInstrTypesSeen in the pass constructor.

This value may be used uninitialized in SIInsertWaits::insertWait.
Found with MemorySanitizer.

llvm-svn: 187869

11 years agoRemove the assertion for now. This breaks lld.
Dmitri Gribenko [Wed, 7 Aug 2013 07:12:08 +0000 (07:12 +0000)]
Remove the assertion for now.  This breaks lld.

lld has a hashtable with StringRef keys; it needs to iterate over the keys in
*insertion* order.  This is currently implemented as std::vector<StringRef> +
DenseMap<StringRef, T>.  This will probably need a proper
DenseMapInfo<StringRef> if we don't want to lose memory/performance by
migrating to a different data structure.

llvm-svn: 187868

11 years agoLLVM Interpreter: MIPS tests should pass
Elena Demikhovsky [Wed, 7 Aug 2013 06:13:21 +0000 (06:13 +0000)]
LLVM Interpreter: MIPS tests should pass

llvm-svn: 187867

11 years agoYAMLTraits.h: replace DenseMap that used a bad implementation of DenseMapInfo
Dmitri Gribenko [Wed, 7 Aug 2013 05:51:27 +0000 (05:51 +0000)]
YAMLTraits.h: replace DenseMap that used a bad implementation of DenseMapInfo
for StringRef with a StringMap

The bug is that the empty key compares equal to the tombstone key.

Also added an assertion to DenseMap to catch similar bugs in future.

llvm-svn: 187866

11 years agoclang-format: Improve formatting of builder-type calls.
Daniel Jasper [Wed, 7 Aug 2013 05:34:02 +0000 (05:34 +0000)]
clang-format: Improve formatting of builder-type calls.

This removes a formatting choice that was added at one point, but is
not generally liked by users. Specifically, in builder-type calls, do
(easily) break if the object before the ./-> is either a field or a
parameter-less function call. I.e., don't break after "aa.aa.aa" or
"aa.aa.aa()". In general, these sequences in builder-type calls are
seen as a single entity and thus breaking them up is a bad idea.

llvm-svn: 187865

11 years agoChange public functions of LTOCodeGenerator from ret-false-on-succ to ret-true-on...
Shuxin Yang [Wed, 7 Aug 2013 05:19:23 +0000 (05:19 +0000)]
Change public functions of LTOCodeGenerator from ret-false-on-succ to ret-true-on-succ.

As of this revision, all functions of LTOCodeGenerator are consistent in
ret-true-on-succ.

Tested on multiple OSes.

llvm-svn: 187864

11 years agoCreate a pattern for the "trap" instruction.
Reed Kotler [Wed, 7 Aug 2013 04:00:26 +0000 (04:00 +0000)]
Create a pattern for the "trap" instruction.

llvm-svn: 187863

11 years ago[lit] Use py2&3 compatible exec() syntax.
Daniel Dunbar [Wed, 7 Aug 2013 03:25:28 +0000 (03:25 +0000)]
[lit] Use py2&3 compatible exec() syntax.

llvm-svn: 187862

11 years ago[lit] Use newer StringIO class.
Daniel Dunbar [Wed, 7 Aug 2013 03:24:20 +0000 (03:24 +0000)]
[lit] Use newer StringIO class.

llvm-svn: 187861

11 years ago[lit] Use modern absolute/relative import style.
Daniel Dunbar [Wed, 7 Aug 2013 03:23:12 +0000 (03:23 +0000)]
[lit] Use modern absolute/relative import style.

llvm-svn: 187860

11 years ago[lit] Avoid __cmp__ and cmp().
Daniel Dunbar [Wed, 7 Aug 2013 03:22:02 +0000 (03:22 +0000)]
[lit] Avoid __cmp__ and cmp().

llvm-svn: 187859

11 years ago[lit] Avoid use of iterator .next() method.
Daniel Dunbar [Wed, 7 Aug 2013 03:20:54 +0000 (03:20 +0000)]
[lit] Avoid use of iterator .next() method.

llvm-svn: 187858

11 years ago[lit] Use .write() methods instead of print statement.
Daniel Dunbar [Wed, 7 Aug 2013 03:19:45 +0000 (03:19 +0000)]
[lit] Use .write() methods instead of print statement.

llvm-svn: 187857

11 years ago[lit] Use dual-compatible print() syntax where possible.
Daniel Dunbar [Wed, 7 Aug 2013 03:18:36 +0000 (03:18 +0000)]
[lit] Use dual-compatible print() syntax where possible.

llvm-svn: 187856

11 years ago[lit] Remove use of deprecated parameter tuple unpacking.
Daniel Dunbar [Wed, 7 Aug 2013 03:17:27 +0000 (03:17 +0000)]
[lit] Remove use of deprecated parameter tuple unpacking.

llvm-svn: 187855

11 years ago[lit] Remove uses of deprecated except syntax.
Daniel Dunbar [Wed, 7 Aug 2013 03:16:19 +0000 (03:16 +0000)]
[lit] Remove uses of deprecated except syntax.

 - Since we only have a few of these, use the cumbersome method of getting the
   exception object from 'sys' to retain the current pre-2.6 compatibility.

llvm-svn: 187854

11 years ago[lit] Use more modern syntax for constructing exceptions.
Daniel Dunbar [Wed, 7 Aug 2013 03:15:10 +0000 (03:15 +0000)]
[lit] Use more modern syntax for constructing exceptions.

llvm-svn: 187853

11 years ago[lit] Drop --no-execute, which isn't generally useful.
Daniel Dunbar [Wed, 7 Aug 2013 03:14:00 +0000 (03:14 +0000)]
[lit] Drop --no-execute, which isn't generally useful.

llvm-svn: 187852

11 years ago[lit] tests: Change discovery test to use --show-tests.
Daniel Dunbar [Wed, 7 Aug 2013 03:12:51 +0000 (03:12 +0000)]
[lit] tests: Change discovery test to use --show-tests.

llvm-svn: 187851

11 years ago[lit] Add a --show-tests option.
Daniel Dunbar [Wed, 7 Aug 2013 03:11:42 +0000 (03:11 +0000)]
[lit] Add a --show-tests option.

llvm-svn: 187850

11 years ago[lit] Remove dead ignoreStdError argument.
Daniel Dunbar [Wed, 7 Aug 2013 03:08:46 +0000 (03:08 +0000)]
[lit] Remove dead ignoreStdError argument.

llvm-svn: 187849

11 years agoDisabled columnWidth test for OSX, need someone with Mac to deal with this effectively.
Alexander Kornienko [Wed, 7 Aug 2013 02:08:31 +0000 (02:08 +0000)]
Disabled columnWidth test for OSX, need someone with Mac to deal with this effectively.

llvm-svn: 187848

11 years agoUse correct platform detection macro: __MACOSX__ -> __APPLE__
Alexander Kornienko [Wed, 7 Aug 2013 01:23:28 +0000 (01:23 +0000)]
Use correct platform detection macro: __MACOSX__ -> __APPLE__

llvm-svn: 187847

11 years agoFix boolean logic in LockFileManager and test it
Reid Kleckner [Wed, 7 Aug 2013 01:22:04 +0000 (01:22 +0000)]
Fix boolean logic in LockFileManager and test it

This fixes a bug from r187826.

Reviewers: hans

Differential Revision: http://llvm-reviews.chandlerc.com/D1304

llvm-svn: 187846

11 years agoAvoid using alloca in Windows/Program.inc
Reid Kleckner [Wed, 7 Aug 2013 01:21:33 +0000 (01:21 +0000)]
Avoid using alloca in Windows/Program.inc

One use needs to copy the alloca into a std::string, and the other use
is before calling CreateProcess, which is very heavyweight anyway.

llvm-svn: 187845

11 years agoAdd a way to grab a particular attribute out of a DIE.
Eric Christopher [Wed, 7 Aug 2013 01:18:33 +0000 (01:18 +0000)]
Add a way to grab a particular attribute out of a DIE.
Use it when we're looking for a string in particular. Update comments
as well.

llvm-svn: 187844

11 years agoMove somewhat messy conditional out of line.
Eric Christopher [Wed, 7 Aug 2013 01:18:24 +0000 (01:18 +0000)]
Move somewhat messy conditional out of line.
No functional change.

llvm-svn: 187843

11 years agoDisable tests on WIN32 (which has incorrect implementation of isPrint and
Alexander Kornienko [Wed, 7 Aug 2013 00:41:18 +0000 (00:41 +0000)]
Disable tests on WIN32 (which has incorrect implementation of isPrint and
columnWidth), and partially disable tests on MACOSX (which handles some
characters differently).

llvm-svn: 187842

11 years agoRevert "[sanitizer] Intercept sched_getaffinity."
David Blaikie [Wed, 7 Aug 2013 00:37:26 +0000 (00:37 +0000)]
Revert "[sanitizer] Intercept sched_getaffinity."

This reverts commit r187788.

The test case is unreliable (as the test may be run in a situation in
which it has no affinity with cpu0). This can be recommitted with a more
reliable test - possibly using CPU_COUNT != 0 instead (I wasn't entirely
sure that a process was guaranteed to have at least one affinity, though
it seems reasonable, or I'd have made the change myself).

llvm-svn: 187841

11 years agoclang-cl: Use .obj as object file extension instead of .o
Hans Wennborg [Wed, 7 Aug 2013 00:32:15 +0000 (00:32 +0000)]
clang-cl: Use .obj as object file extension instead of .o

Differential Revision: http://llvm-reviews.chandlerc.com/D1302

llvm-svn: 187840

11 years agoCheck for _strtoi64 in the cmake build if strtoll is missing
Reid Kleckner [Wed, 7 Aug 2013 00:29:15 +0000 (00:29 +0000)]
Check for _strtoi64 in the cmake build if strtoll is missing

Previously this check was guarded by MSVC, which doesn't distinguish
between the compiler and the headers/library.  This enables clang to
compile more of LLVM on Windows with Microsoft headers.

Remove some unused macros while I'm here: error_t and LTDL stuff.

llvm-svn: 187839

11 years agoRemove unused functions introduced in r172685 to unbreak the Clang -Werror build
David Blaikie [Wed, 7 Aug 2013 00:25:12 +0000 (00:25 +0000)]
Remove unused functions introduced in r172685 to unbreak the Clang -Werror build

llvm-svn: 187838

11 years agoImplemented llvm::sys::locale::columnWidth and isPrint for the case of generic UTF8...
Alexander Kornienko [Wed, 7 Aug 2013 00:07:07 +0000 (00:07 +0000)]
Implemented llvm::sys::locale::columnWidth and isPrint for the case of generic UTF8-capable terminal.

Summary:
This is a second attempt to get this right. After reading the Unicode
Standard I came up with the code that uses definitions of "printable" and
"column width" more suitable for terminal output (i.e. fixed-width fonts and
special treatment of many control characters).
The implementation here can probably be used for Windows and MacOS if someone
can test it properly.
The patch addresses PR14910.

Reviewers: jordan_rose, gribozavr

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1253

llvm-svn: 187837

11 years agoReplacing /GR with /GR- instead of applying both options to the project. This should...
Aaron Ballman [Tue, 6 Aug 2013 23:34:04 +0000 (23:34 +0000)]
Replacing /GR with /GR- instead of applying both options to the project.  This should reduce some build bot warnings (D9025: "overriding '/GR' with '/GR-'").

llvm-svn: 187836

11 years agoPatch to fix doxygen trailing comments for ObjectiveC properties.
Fariborz Jahanian [Tue, 6 Aug 2013 23:29:00 +0000 (23:29 +0000)]
Patch to fix doxygen trailing comments for ObjectiveC properties.
// rdar://14258334

llvm-svn: 187835

11 years agoR600: Add new file from r187831 to CMakeLists.txt
Tom Stellard [Tue, 6 Aug 2013 23:12:34 +0000 (23:12 +0000)]
R600: Add new file from r187831 to CMakeLists.txt

llvm-svn: 187834

11 years agoTest to see if logging is enabled before printing
Jason Molenda [Tue, 6 Aug 2013 23:08:59 +0000 (23:08 +0000)]
Test to see if logging is enabled before printing
to a log channel in StopInfoBreakpoint::PerformAction().
<rdar://problem/14651751>

llvm-svn: 187833

11 years ago[mips] Rename register classes CPURegs and CPU64Regs.
Akira Hatanaka [Tue, 6 Aug 2013 23:08:38 +0000 (23:08 +0000)]
[mips] Rename register classes CPURegs and CPU64Regs.

llvm-svn: 187832

11 years agoR600/SI: Use VSrc_* register classes as the default classes for types
Tom Stellard [Tue, 6 Aug 2013 23:08:28 +0000 (23:08 +0000)]
R600/SI: Use VSrc_* register classes as the default classes for types

Since the VSrc_* register classes contain both VGPRs and SGPRs, copies
that used be emitted by isel like this:

SGPR = COPY VGPR

Will now be emitted like this:

VSrC = COPY VGPR

This patch also adds a pass that tries to identify and fix situations where
a VGPR to SGPR copy may occur.  Hopefully, these changes will make it
impossible for the compiler to generate illegal VGPR to SGPR copies.

llvm-svn: 187831

11 years agoR600/SI: Add more special cases for opcodes to ensureSRegLimit()
Tom Stellard [Tue, 6 Aug 2013 23:08:18 +0000 (23:08 +0000)]
R600/SI: Add more special cases for opcodes to ensureSRegLimit()

Also factor out the register class lookup to its own function.

llvm-svn: 187830

11 years ago[NVPTX] We dont have any target specific flags yet for generating symbol references...
Justin Holewinski [Tue, 6 Aug 2013 23:06:42 +0000 (23:06 +0000)]
[NVPTX] We dont have any target specific flags yet for generating symbol references, so get rid of the default-only switch statement.  Fixes an MSVC warning.

llvm-svn: 187829

11 years ago[mips] Mark instructions defined in Mips64InstrInfo.td that are duplicates of
Akira Hatanaka [Tue, 6 Aug 2013 23:01:10 +0000 (23:01 +0000)]
[mips] Mark instructions defined in Mips64InstrInfo.td that are duplicates of
instructions defined in MipsInstrInfo.td as codegen-only instructions.

llvm-svn: 187828

11 years agoChange the linkage of these global values to 'internal'.
Bill Wendling [Tue, 6 Aug 2013 22:52:42 +0000 (22:52 +0000)]
Change the linkage of these global values to 'internal'.

The globals being generated here were given the 'private' linkage type. However,
this caused them to end up in different sections with the wrong prefix. E.g.,
they would be in the __TEXT,__const section with an 'L' prefix instead of an 'l'
(lowercase ell) prefix.

The problem is that the linker will eat a literal label with 'L'. If a weak
symbol is then placed into the __TEXT,__const section near that literal, then it
cannot distinguish between the literal and the weak symbol.

Part of the problems here was introduced because the address sanitizer converted
some C strings into constant initializers with trailing nuls. (Thus putting them
in the __const section with the wrong prefix.) The others were variables that
the address sanitizer created but simply had the wrong linkage type.

llvm-svn: 187827

11 years agoRemove some std stream usage from Support and TableGen
Reid Kleckner [Tue, 6 Aug 2013 22:51:21 +0000 (22:51 +0000)]
Remove some std stream usage from Support and TableGen

LLVM's coding standards recommend raw_ostream and MemoryBuffer for
reading and writing text.

This has the side effect of allowing clang to compile more of Support
and TableGen in the Microsoft C++ ABI.

llvm-svn: 187826

11 years agoLoopVectorize: Allow vectorization of loops with lifetime markers
Arnold Schwaighofer [Tue, 6 Aug 2013 22:37:52 +0000 (22:37 +0000)]
LoopVectorize: Allow vectorization of loops with lifetime markers

Patch by Marc Jessome!

llvm-svn: 187825

11 years ago[mips] Delete unnecessary InstAliases. Also, clear some of the InstAlias'
Akira Hatanaka [Tue, 6 Aug 2013 22:35:29 +0000 (22:35 +0000)]
[mips] Delete unnecessary InstAliases. Also, clear some of the InstAlias'
EmitAlias flag and have MipsInstPrinter::printAlias print the aliases.

llvm-svn: 187824

11 years agoRename TargetInfo -> LinkingContext.
Rui Ueyama [Tue, 6 Aug 2013 22:31:59 +0000 (22:31 +0000)]
Rename TargetInfo -> LinkingContext.

Also change some local variable names: "ti" -> "context" and
"_targetInfo" -> "_context".

Differential Revision: http://llvm-reviews.chandlerc.com/D1301

llvm-svn: 187823

11 years agoInitialize m_leak member variable.
Michael Sartain [Tue, 6 Aug 2013 22:21:08 +0000 (22:21 +0000)]
Initialize m_leak member variable.

llvm-svn: 187822

11 years ago[mips] Replace usages of register classes with register operands. Also, remove
Akira Hatanaka [Tue, 6 Aug 2013 22:20:40 +0000 (22:20 +0000)]
[mips] Replace usages of register classes with register operands. Also, remove
unnecessary jalr InstAliases in Mips64InstrInfo.td and add the code to print
jalr InstAliases in MipsInstPrinter::printAlias.

llvm-svn: 187821

11 years agoclang-cl: Implement support for the /Fo option
Hans Wennborg [Tue, 6 Aug 2013 22:11:28 +0000 (22:11 +0000)]
clang-cl: Implement support for the /Fo option

This implements support for the /Fo option, which is used
to set the filename or output dir for object files.

Differential Revision: http://llvm-reviews.chandlerc.com/D1302

llvm-svn: 187820

11 years agoChange private functions of LTOCodeGenerator from ret-false-on-succ to ret-true-on...
Shuxin Yang [Tue, 6 Aug 2013 21:51:21 +0000 (21:51 +0000)]
Change private functions of LTOCodeGenerator from ret-false-on-succ to ret-true-on-succ.

llvm-svn: 187819

11 years agoFix bug in Host::getLLDBPath() due to misusing Twine
Daniel Malea [Tue, 6 Aug 2013 21:40:08 +0000 (21:40 +0000)]
Fix bug in Host::getLLDBPath() due to misusing Twine
- use SmallString instead
- original implementation resulted in incorrect behaviour of lldb -P

Fix by Kal Conley!

llvm-svn: 187818

11 years agoAdd a new warning to -Wloop-analysis to detect suspicious increments or
Richard Trieu [Tue, 6 Aug 2013 21:31:54 +0000 (21:31 +0000)]
Add a new warning to -Wloop-analysis to detect suspicious increments or
decrements inside for loops.  Idea for this warning proposed in PR15636:

http://llvm.org/bugs/show_bug.cgi?id=15636

llvm-svn: 187817

11 years agoCentralizing Intel compiler detection logic in lldbtest.py to avoid duplication in...
Daniel Malea [Tue, 6 Aug 2013 20:51:41 +0000 (20:51 +0000)]
Centralizing Intel compiler detection logic in lldbtest.py to avoid duplication in the future.
- Addresses review comments from Stefanus!

llvm-svn: 187816