platform/upstream/llvm.git
11 years agoAdd an LLDB_LOG_TARGET logging channel (log eanble lldb target).
Jason Molenda [Wed, 5 Dec 2012 00:25:49 +0000 (00:25 +0000)]
Add an LLDB_LOG_TARGET logging channel (log eanble lldb target).

Update the Target methods which can change the target log to this
channel.

llvm-svn: 169342

11 years agoFix Linux build warnings due to redefinition of macros:
Daniel Malea [Wed, 5 Dec 2012 00:20:57 +0000 (00:20 +0000)]
Fix Linux build warnings due to redefinition of macros:
- add new header lldb-python.h to be included before other system headers
- short term fix (eventually python dependencies must be cleaned up)

Patch by Matt Kopec!

llvm-svn: 169341

11 years ago<rdar://problem/12649160>
Greg Clayton [Wed, 5 Dec 2012 00:16:59 +0000 (00:16 +0000)]
<rdar://problem/12649160>

Added the ability to debug through your process exec'ing itself to the same architecture.

llvm-svn: 169340

11 years agoAdd x86 isel lowering logic to form bit test with inverted condition. e.g.
Evan Cheng [Wed, 5 Dec 2012 00:10:38 +0000 (00:10 +0000)]
Add x86 isel lowering logic to form bit test with inverted condition. e.g.
x ^ -1.

Patch by David Majnemer.
rdar://12755626

llvm-svn: 169339

11 years agoThread safety analysis: Add a new "beta" warning flag: -Wthread-safety-beta.
DeLesley Hutchins [Wed, 5 Dec 2012 00:06:15 +0000 (00:06 +0000)]
Thread safety analysis: Add a new "beta" warning flag: -Wthread-safety-beta.
As the analysis improves, it will continue to add new warnings that are
potentially disruptive to existing users.  From now on, such warnings will
first be introduced under the "beta" flag.  Such warnings are not turned on by
default; their purpose is to allow users to test their code against future
planned changes, before those changes are actually made.  After a suitable
migration period, beta warnings will be folded into the standard
-Wthread-safety.

llvm-svn: 169338

11 years agoAppease GCC's -Wparentheses.
Matt Beaumont-Gay [Tue, 4 Dec 2012 23:54:02 +0000 (23:54 +0000)]
Appease GCC's -Wparentheses.

(TIL that Clang's -Wparentheses ignores 'x || y && "foo"' on purpose. Neat.)

llvm-svn: 169337

11 years agoSplit up the ParseOptionalAttrs method into three different methods for each
Bill Wendling [Tue, 4 Dec 2012 23:40:58 +0000 (23:40 +0000)]
Split up the ParseOptionalAttrs method into three different methods for each
class of attributes. This makes it much easier to check for errors and to reuse
the code.

llvm-svn: 169336

11 years agoFix a use-after-unmap bug in /proc/self/maps caching. The cached buffer was occasiona...
Alexander Potapenko [Tue, 4 Dec 2012 23:30:00 +0000 (23:30 +0000)]
Fix a use-after-unmap bug in /proc/self/maps caching. The cached buffer was occasionally deleted in the MemoryMappingLayout destructor.

llvm-svn: 169335

11 years agoLoopVectorizer: Increase the number of pointers that can be tested at runtime. If...
Nadav Rotem [Tue, 4 Dec 2012 23:25:24 +0000 (23:25 +0000)]
LoopVectorizer: Increase the number of pointers that can be tested at runtime. If we cant prove statically that the pointers are disjoint then we add the runtime check.

llvm-svn: 169334

11 years agoEnable if-conversion during vectorization.
Nadav Rotem [Tue, 4 Dec 2012 22:59:52 +0000 (22:59 +0000)]
Enable if-conversion during vectorization.

llvm-svn: 169331

11 years agoAdd -whole-archive around the ASan runtime archive in the link command.
Chandler Carruth [Tue, 4 Dec 2012 22:54:37 +0000 (22:54 +0000)]
Add -whole-archive around the ASan runtime archive in the link command.

This ensures that even though it comes first, we pick up its .o files.
Note that if we can use this (or something similar / equivalent) on
other platforms, we could potentially remove
ReplaceOperatorsNewAndDelete from the ASan runtimes.

We should probably do something similar for TSan and MSan as well.

llvm-svn: 169328

11 years agoARM custom lower ctpop for vector types. Patch by Pete Couperus.
Evan Cheng [Tue, 4 Dec 2012 22:41:50 +0000 (22:41 +0000)]
ARM custom lower ctpop for vector types. Patch by Pete Couperus.

llvm-svn: 169325

11 years agoFix a bug in vectorization of if-converted reduction variables. If the
Nadav Rotem [Tue, 4 Dec 2012 22:40:22 +0000 (22:40 +0000)]
Fix a bug in vectorization of if-converted reduction variables. If the
reduction variable is not used outside the loop then we ran into an
endless loop. This change checks if we found the original PHI.

llvm-svn: 169324

11 years agoSpeed up the AllocationOrder class a bit.
Jakob Stoklund Olesen [Tue, 4 Dec 2012 22:25:16 +0000 (22:25 +0000)]
Speed up the AllocationOrder class a bit.

Allow the central functions to be inlined, and use the argumentless
isHint() function when possible.

llvm-svn: 169319

11 years agoAlphabetize source files, just like they have been before.
Ted Kremenek [Tue, 4 Dec 2012 22:17:32 +0000 (22:17 +0000)]
Alphabetize source files, just like they have been before.

llvm-svn: 169318

11 years ago For rdar://12329730, last piece.
Shuxin Yang [Tue, 4 Dec 2012 22:15:32 +0000 (22:15 +0000)]
  For rdar://12329730, last piece.

  This change attempts to simplify (X^Y) -> X or Y in the user's context if we know that
only bits from X or Y are demanded.

  A minimized case is provided bellow. This change will simplify "t>>16" into "var1 >>16".

  =============================================================
  unsigned foo (unsigned val1, unsigned val2) {
    unsigned t = val1 ^ 1234;
    return (t >> 16) | t; // NOTE: t is used more than once.
  }
  =============================================================

  Note that if the "t" were used only once, the expression would be finally optimized as well.
However, with with this change, the optimization will take place earlier.

  Reviewed by Nadav, Thanks a lot!

llvm-svn: 169317

11 years agoFix comment in ABIMacOSX_i386::RegisterIsCalleeSaved to say that
Jason Molenda [Tue, 4 Dec 2012 22:08:50 +0000 (22:08 +0000)]
Fix comment in ABIMacOSX_i386::RegisterIsCalleeSaved to say that
these are the *non-volatile* registers on Darwin/i386, not the
volatile registers.
Recognize the sp, pc, fp generic reg names as well.

llvm-svn: 169316

11 years agoComment change made in r169304 as requested by Eric Christopher.
David Blaikie [Tue, 4 Dec 2012 22:02:33 +0000 (22:02 +0000)]
Comment change made in r169304 as requested by Eric Christopher.

llvm-svn: 169315

11 years agoDefine store instructions with base+register offset addressing mode
Jyotsna Verma [Tue, 4 Dec 2012 21:58:25 +0000 (21:58 +0000)]
Define store instructions with base+register offset addressing mode
using multiclass.

llvm-svn: 169314

11 years agoUser isl sha commit id instead of the git tag
Tobias Grosser [Tue, 4 Dec 2012 21:54:37 +0000 (21:54 +0000)]
User isl sha commit id instead of the git tag

Apperently the git tag causes trouble in some scripts.

llvm-svn: 169313

11 years agoUse the 'count' attribute to calculate the upper bound of an array.
Bill Wendling [Tue, 4 Dec 2012 21:34:03 +0000 (21:34 +0000)]
Use the 'count' attribute to calculate the upper bound of an array.

The count attribute is more accurate with regards to the size of an array. It
also obviates the upper bound attribute in the subrange. We can also better
handle an unbound array by setting the count to -1 instead of the lower bound to
1 and upper bound to 0.

llvm-svn: 169312

11 years agoUse the 'count' attribute to calculate the upper bound of an array.
Bill Wendling [Tue, 4 Dec 2012 21:33:58 +0000 (21:33 +0000)]
Use the 'count' attribute to calculate the upper bound of an array.

The count attribute is more accurate with regards to the size of an array. It
also obviates the upper bound attribute in the subrange. We can also better
handle an unbound array by setting the count to -1 instead of the lower bound to
1 and upper bound to 0.

llvm-svn: 169311

11 years agoCurrently, with -fsanitize=address, the driver appends libclang_rt.asan.a to
Matt Beaumont-Gay [Tue, 4 Dec 2012 21:18:26 +0000 (21:18 +0000)]
Currently, with -fsanitize=address, the driver appends libclang_rt.asan.a to
the link command. This all works fine when the driver is also responsible for
adding -lstdc++ to the link command. But, if -lstdc++ (or libstdc++.a, etc) is
passed explicitly to the driver, the ASan runtime will appear in the link
command after the standard library, leading to multiple-definition errors for
the global 'operator new' and 'operator delete'. Fix this in a painfully
simple way, by inserting libclang_rt.asan.a at the start of the link command
instead of the end.

If we need to do something more clever, we can walk the link command looking
for something that resembles libstdc++ and insert libclang_rt.asan.a as late
as possible, but the simple solution works for now.

llvm-svn: 169310

11 years agodocs: Begin Sphinxification of docs/tutorial/
Sean Silva [Tue, 4 Dec 2012 21:16:41 +0000 (21:16 +0000)]
docs: Begin Sphinxification of docs/tutorial/

llvm-svn: 169309

11 years agodocs: fixup legacy HTML link
Sean Silva [Tue, 4 Dec 2012 21:16:34 +0000 (21:16 +0000)]
docs: fixup legacy HTML link

llvm-svn: 169308

11 years agoTesting C declarations embedded in
Fariborz Jahanian [Tue, 4 Dec 2012 21:15:23 +0000 (21:15 +0000)]
Testing C declarations embedded in
<declaration> tag of Comment XML and fixed a
missing block literal printout as result of the testing.
// rdar://12378714

llvm-svn: 169307

11 years agoAdd library dependencies to the lld cmake build.
Benjamin Kramer [Tue, 4 Dec 2012 21:09:04 +0000 (21:09 +0000)]
Add library dependencies to the lld cmake build.

llvm-svn: 169306

11 years agoReapply r160148 (reverted in r163570) fixing spurious breakpoints in modern GDB
David Blaikie [Tue, 4 Dec 2012 21:05:36 +0000 (21:05 +0000)]
Reapply r160148 (reverted in r163570) fixing spurious breakpoints in modern GDB

This reapplies the fix for PR13303 now with more justification. Based on my
execution of the GDB 7.5 test suite this results in:

expected passes: 16101 -> 20890 (+30%)
unexpected failures: 4826 -> 637 (-77%)

There are 23 checks that used to pass and now fail. They are all in
gdb.reverse. Investigating a few looks like they were accidentally passing
due to extra breakpoints being set by this bug. They're generally due to the
difference in end location between gcc and clang, the test suite is trying to
set breakpoints on the closing '}' that clang doesn't associate with any
instructions.

llvm-svn: 169304

11 years agoAdd missing destructors found with -Wnon-virtual-dtor.
Daniel Jasper [Tue, 4 Dec 2012 21:05:31 +0000 (21:05 +0000)]
Add missing destructors found with -Wnon-virtual-dtor.

llvm-svn: 169303

11 years agoIn the data formatters, if we know the result
Sean Callanan [Tue, 4 Dec 2012 20:56:04 +0000 (20:56 +0000)]
In the data formatters, if we know the result
type of an Objective-C selector, don't bother
making the expression parser resolve it all over
again.  Just send the message straight to the
object pointer as if it were an id, and cast the
result.

<rdar://problem/12799087>

llvm-svn: 169300

11 years agoCache the names for Objective-C classes if we know
Sean Callanan [Tue, 4 Dec 2012 20:52:38 +0000 (20:52 +0000)]
Cache the names for Objective-C classes if we know
them while making our initial run through the
Objective-C runtime's class tables.

<rdar://problem/12799087>

llvm-svn: 169299

11 years agoMark TestConnectRemote.py as expected to fail on Linux due to bugzilla #14427
Daniel Malea [Tue, 4 Dec 2012 19:53:59 +0000 (19:53 +0000)]
Mark TestConnectRemote.py as expected to fail on Linux due to bugzilla #14427

llvm-svn: 169295

11 years agoRemove a URL from code
Eli Bendersky [Tue, 4 Dec 2012 19:08:43 +0000 (19:08 +0000)]
Remove a URL from code

llvm-svn: 169293

11 years agoAdapt to LLVM commit 169291 which streamlines the usage of NaCl/NativeClient
Eli Bendersky [Tue, 4 Dec 2012 18:38:10 +0000 (18:38 +0000)]
Adapt to LLVM commit 169291 which streamlines the usage of NaCl/NativeClient
in the triple.

llvm-svn: 169292

11 years agoMake NaCl naming consistent. The triple OSType is called NaCl and is represented
Eli Bendersky [Tue, 4 Dec 2012 18:37:26 +0000 (18:37 +0000)]
Make NaCl naming consistent. The triple OSType is called NaCl and is represented
textually as NativeClient. Also added a link to the native client project for
readers unfamiliar with it.

A Clang patch will follow shortly.

llvm-svn: 169291

11 years agoadditional test for declaration tag of a class extension.
Fariborz Jahanian [Tue, 4 Dec 2012 18:25:34 +0000 (18:25 +0000)]
additional test for declaration tag of a class extension.
// rdar://12378714

llvm-svn: 169289

11 years agoAdd support for reduction variables when IF-conversion is enabled.
Nadav Rotem [Tue, 4 Dec 2012 18:17:33 +0000 (18:17 +0000)]
Add support for reduction variables when IF-conversion is enabled.

llvm-svn: 169288

11 years agoAdd patterns to define 'combine', 'tstbit', 'ct0/cl0' (count trailing/leading zeros)
Jyotsna Verma [Tue, 4 Dec 2012 18:05:01 +0000 (18:05 +0000)]
Add patterns to define 'combine', 'tstbit', 'ct0/cl0' (count trailing/leading zeros)
instructions.

llvm-svn: 169287

11 years agoError recovery part 2
Alexander Kornienko [Tue, 4 Dec 2012 17:27:50 +0000 (17:27 +0000)]
Error recovery part 2

Summary: Adds recovery for structural errors in clang-format.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, silvas
Differential Revision: http://llvm-reviews.chandlerc.com/D164

llvm-svn: 169286

11 years agoobjective-c blocks: Consider padding due to alignment
Fariborz Jahanian [Tue, 4 Dec 2012 17:20:57 +0000 (17:20 +0000)]
objective-c blocks: Consider padding due to alignment
after the fixed size block header when generating
captured block variable info. // rdar://12773256

llvm-svn: 169285

11 years agoAdd constant extender support to ALU32 instructions for V2.
Jyotsna Verma [Tue, 4 Dec 2012 17:12:00 +0000 (17:12 +0000)]
Add constant extender support to ALU32 instructions for V2.

llvm-svn: 169284

11 years agoA test in thid directory was not being run because lit.local.cfg didn't
Eli Bendersky [Tue, 4 Dec 2012 17:00:11 +0000 (17:00 +0000)]
A test in thid directory was not being run because lit.local.cfg didn't
include .ll files. Fix that.

llvm-svn: 169283

11 years agoFix comment typo.
Duncan Sands [Tue, 4 Dec 2012 16:36:05 +0000 (16:36 +0000)]
Fix comment typo.

llvm-svn: 169282

11 years agoThis patch introduces initial-exec model support for thread-local storage
Bill Schmidt [Tue, 4 Dec 2012 16:18:08 +0000 (16:18 +0000)]
This patch introduces initial-exec model support for thread-local storage
on 64-bit PowerPC ELF.

The patch includes code to handle external assembly and MC output with the
integrated assembler.  It intentionally does not support the "old" JIT.

For the initial-exec TLS model, the ABI requires the following to calculate
the address of external thread-local variable x:

 Code sequence            Relocation                  Symbol
  ld 9,x@got@tprel(2)      R_PPC64_GOT_TPREL16_DS      x
  add 9,9,x@tls            R_PPC64_TLS                 x

The register 9 is arbitrary here.  The linker will replace x@got@tprel
with the offset relative to the thread pointer to the generated GOT
entry for symbol x.  It will replace x@tls with the thread-pointer
register (13).

The two test cases verify correct assembly output and relocation output
as just described.

PowerPC-specific selection node variants are added for the two
instructions above:  LD_GOT_TPREL and ADD_TLS.  These are inserted
when an initial-exec global variable is encountered by
PPCTargetLowering::LowerGlobalTLSAddress(), and later lowered to
machine instructions LDgotTPREL and ADD8TLS.  LDgotTPREL is a pseudo
that uses the same LDrs support added for medium code model's LDtocL,
with a different relocation type.

The rest of the processing is straightforward.

llvm-svn: 169281

11 years agoUpdate release notes for NVPTX
Justin Holewinski [Tue, 4 Dec 2012 16:11:51 +0000 (16:11 +0000)]
Update release notes for NVPTX

llvm-svn: 169280

11 years agotsan: output thread names
Dmitry Vyukov [Tue, 4 Dec 2012 15:46:05 +0000 (15:46 +0000)]
tsan: output thread names

llvm-svn: 169279

11 years agoClang-format error recovery part 1
Alexander Kornienko [Tue, 4 Dec 2012 15:40:36 +0000 (15:40 +0000)]
Clang-format error recovery part 1

Reviewers: klimek

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

llvm-svn: 169278

11 years agoc-index-test.c: Make C89-compliant.
NAKAMURA Takumi [Tue, 4 Dec 2012 15:32:03 +0000 (15:32 +0000)]
c-index-test.c: Make C89-compliant.

llvm-svn: 169277

11 years agolibclang: Add a function to libclang for retrieving the bit width value
Dmitri Gribenko [Tue, 4 Dec 2012 15:13:46 +0000 (15:13 +0000)]
libclang: Add a function to libclang for retrieving the bit width value

Patch by Jyun-Yan You.

llvm-svn: 169276

11 years ago[tsan] add a compile-time error for 64-bit-only support
Kostya Serebryany [Tue, 4 Dec 2012 15:13:30 +0000 (15:13 +0000)]
[tsan] add a compile-time error for 64-bit-only support

llvm-svn: 169275

11 years agoMake parenthesis counting and aligning a bit saner.
Daniel Jasper [Tue, 4 Dec 2012 14:54:30 +0000 (14:54 +0000)]
Make parenthesis counting and aligning a bit saner.

Review: http://llvm-reviews.chandlerc.com/D162
llvm-svn: 169274

11 years agotsan: make atomic operations atomic again
Dmitry Vyukov [Tue, 4 Dec 2012 14:50:10 +0000 (14:50 +0000)]
tsan: make atomic operations atomic again

llvm-svn: 169273

11 years agoEnum formatting implementation
Alexander Kornienko [Tue, 4 Dec 2012 14:46:19 +0000 (14:46 +0000)]
Enum formatting implementation

Reviewers: djasper, klimek

Reviewed By: klimek

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

llvm-svn: 169272

11 years agoFix spelling I ran over while proof-reading tests.
Manuel Klimek [Tue, 4 Dec 2012 14:42:08 +0000 (14:42 +0000)]
Fix spelling I ran over while proof-reading tests.

llvm-svn: 169271

11 years ago[tsan] test the allocator with CompactSizeClassMap
Kostya Serebryany [Tue, 4 Dec 2012 14:39:51 +0000 (14:39 +0000)]
[tsan] test the allocator with CompactSizeClassMap

llvm-svn: 169270

11 years agoGet rid of references to Tcl, DejagGNU, old test structure, discourage the use
Eli Bendersky [Tue, 4 Dec 2012 14:34:00 +0000 (14:34 +0000)]
Get rid of references to Tcl, DejagGNU, old test structure, discourage the use
of grep in favor of FileCheck, and other cleanups.

llvm-svn: 169269

11 years agoToolChains.cpp: Fixup r169260, clang/Config/config.h needs to be listed *last*, or...
NAKAMURA Takumi [Tue, 4 Dec 2012 14:31:59 +0000 (14:31 +0000)]
ToolChains.cpp: Fixup r169260, clang/Config/config.h needs to be listed *last*, or llvm/Config/llvm-config.h could not be read in header files.

llvm-svn: 169268

11 years ago[tsan] minor interface refactoring
Kostya Serebryany [Tue, 4 Dec 2012 14:15:17 +0000 (14:15 +0000)]
[tsan] minor interface refactoring

llvm-svn: 169267

11 years agotsan: fix nand operation
Dmitry Vyukov [Tue, 4 Dec 2012 14:08:39 +0000 (14:08 +0000)]
tsan: fix nand operation

llvm-svn: 169266

11 years agotsan: add __attribute__((visibility("default"))) to interface functions
Dmitry Vyukov [Tue, 4 Dec 2012 14:01:21 +0000 (14:01 +0000)]
tsan: add __attribute__((visibility("default"))) to interface functions

llvm-svn: 169265

11 years ago[tsan] refactor the allocator tests to allow testing other flavours of the allocator...
Kostya Serebryany [Tue, 4 Dec 2012 13:59:22 +0000 (13:59 +0000)]
[tsan] refactor the allocator tests to allow testing other flavours of the allocator (add templates)

llvm-svn: 169264

11 years agoRemove the very out-of-date listing of "very important LLVM areas". I don't
Eli Bendersky [Tue, 4 Dec 2012 13:55:17 +0000 (13:55 +0000)]
Remove the very out-of-date listing of "very important LLVM areas". I don't
think it adds much and keeping it up-to-date is (obviously) a chore.

llvm-svn: 169263

11 years agoFixes crash in isDerivedFrom for recursive templates.
Manuel Klimek [Tue, 4 Dec 2012 13:40:29 +0000 (13:40 +0000)]
Fixes crash in isDerivedFrom for recursive templates.

llvm-svn: 169262

11 years agoSmall fixes to unary operator recognition and handling of include
Daniel Jasper [Tue, 4 Dec 2012 13:02:32 +0000 (13:02 +0000)]
Small fixes to unary operator recognition and handling of include
directives.

llvm-svn: 169261

11 years agoAutotools has the same include guard for both Clang and LLVM's config.h.
Chandler Carruth [Tue, 4 Dec 2012 12:24:59 +0000 (12:24 +0000)]
Autotools has the same include guard for both Clang and LLVM's config.h.
Shuffling order causes the wrong one to win.

CMake didn't exhibit this problem because Clang's has *no* guards.

I'll fix this properly tomorrow when Eric and I can check both build
systems and get them to DTRT, but for now unbreak some bots by hoisting
this header.

llvm-svn: 169260

11 years agotsan: fix trace handling when trace is reused between threads
Dmitry Vyukov [Tue, 4 Dec 2012 12:19:53 +0000 (12:19 +0000)]
tsan: fix trace handling when trace is reused between threads

llvm-svn: 169259

11 years agoUpdate matcher documentation with script.
Daniel Jasper [Tue, 4 Dec 2012 12:08:08 +0000 (12:08 +0000)]
Update matcher documentation with script.

We still need to make the python script understand some of the new
matchers, but this should be an improvement.

llvm-svn: 169258

11 years agoAdd parameterCountIs() matcher.
Daniel Jasper [Tue, 4 Dec 2012 11:54:27 +0000 (11:54 +0000)]
Add parameterCountIs() matcher.

llvm-svn: 169257

11 years agoImprove MSan tests.
Evgeniy Stepanov [Tue, 4 Dec 2012 11:42:05 +0000 (11:42 +0000)]
Improve MSan tests.

llvm-svn: 169256

11 years agoKillTheDoctor.cpp: Restore Win32 SDK headers before r169251.
NAKAMURA Takumi [Tue, 4 Dec 2012 11:34:27 +0000 (11:34 +0000)]
KillTheDoctor.cpp: Restore Win32 SDK headers before r169251.

llvm-svn: 169255

11 years agoReplace workarounds with correct fixes.
Daniel Jasper [Tue, 4 Dec 2012 10:50:12 +0000 (10:50 +0000)]
Replace workarounds with correct fixes.

Also fix header guard.

http://llvm-reviews.chandlerc.com/D159

llvm-svn: 169254

11 years agoClean up the sample include orderings, not that it really matters...
Chandler Carruth [Tue, 4 Dec 2012 10:46:21 +0000 (10:46 +0000)]
Clean up the sample include orderings, not that it really matters...

llvm-svn: 169253

11 years agoSort the #include lines for tools/...
Chandler Carruth [Tue, 4 Dec 2012 10:44:52 +0000 (10:44 +0000)]
Sort the #include lines for tools/...

Again, tools are trickier to pick the main module header for than
library source files. I've started to follow the pattern of using
LLVMContext.h when it is included as a stub for program source files.

llvm-svn: 169252

11 years agoSort the #include lines for utils/...
Chandler Carruth [Tue, 4 Dec 2012 10:37:14 +0000 (10:37 +0000)]
Sort the #include lines for utils/...

I've tried to find main moudle headers where possible, but the TableGen
stuff may warrant someone else looking at it.

llvm-svn: 169251

11 years agoSort the #include lines for unittest/...
Chandler Carruth [Tue, 4 Dec 2012 10:23:08 +0000 (10:23 +0000)]
Sort the #include lines for unittest/...

llvm-svn: 169250

11 years agoSort the #include lines of the examples/... tree.
Chandler Carruth [Tue, 4 Dec 2012 10:16:57 +0000 (10:16 +0000)]
Sort the #include lines of the examples/... tree.

llvm-svn: 169249

11 years agoTeach the include sorter to quickly skip files with an extension that
Chandler Carruth [Tue, 4 Dec 2012 10:08:59 +0000 (10:08 +0000)]
Teach the include sorter to quickly skip files with an extension that
doesn't look like it will have C++ code in it.

Suggestions on a better heuristic are welcome.

llvm-svn: 169248

11 years agoTeach the include sorter to skip files under test trees and under INPUTS
Chandler Carruth [Tue, 4 Dec 2012 09:59:54 +0000 (09:59 +0000)]
Teach the include sorter to skip files under test trees and under INPUTS
trees. This allows running the input sorter on the entire clang
repository cleanly now.

llvm-svn: 169247

11 years agoSort the #include lines under utils/...
Chandler Carruth [Tue, 4 Dec 2012 09:53:39 +0000 (09:53 +0000)]
Sort the #include lines under utils/...

llvm-svn: 169245

11 years agoReally sort the #include lines in unittests/...
Chandler Carruth [Tue, 4 Dec 2012 09:53:37 +0000 (09:53 +0000)]
Really sort the #include lines in unittests/...

I forgot to re-sort after fixing main module headers.

llvm-svn: 169244

11 years agoSort the #include lines for unittests/...
Chandler Carruth [Tue, 4 Dec 2012 09:45:34 +0000 (09:45 +0000)]
Sort the #include lines for unittests/...

I've tried to place sensible headers at the top as main-module headers.

llvm-svn: 169243

11 years agoTeach the include sorting script about the gtest headers; sort them with
Chandler Carruth [Tue, 4 Dec 2012 09:44:38 +0000 (09:44 +0000)]
Teach the include sorting script about the gtest headers; sort them with
the system headers.

llvm-svn: 169242

11 years agoSort the #include lines for examples/...
Chandler Carruth [Tue, 4 Dec 2012 09:37:22 +0000 (09:37 +0000)]
Sort the #include lines for examples/...

llvm-svn: 169241

11 years agoSort #include lines for tools/...
Chandler Carruth [Tue, 4 Dec 2012 09:25:21 +0000 (09:25 +0000)]
Sort #include lines for tools/...

Completely automated with sort_includes.py

llvm-svn: 169240

11 years agoUpdate the #include lines of the extra tools.
Chandler Carruth [Tue, 4 Dec 2012 09:21:50 +0000 (09:21 +0000)]
Update the #include lines of the extra tools.

llvm-svn: 169239

11 years agoSort #include lines for all files under include/...
Chandler Carruth [Tue, 4 Dec 2012 09:18:49 +0000 (09:18 +0000)]
Sort #include lines for all files under include/...

This is a simpler sort, entirely automatic with the help of
llvm/utils/sort_includes.py -- no manual edits here.

llvm-svn: 169238

11 years agoSort all of Clang's files under 'lib', and fix up the broken headers
Chandler Carruth [Tue, 4 Dec 2012 09:13:33 +0000 (09:13 +0000)]
Sort all of Clang's files under 'lib', and fix up the broken headers
uncovered.

This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.

I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.

llvm-svn: 169237

11 years agoASTTests, ASTMatchersTests: Move clangEdit before clangAst in USEDLIB.
NAKAMURA Takumi [Tue, 4 Dec 2012 08:20:41 +0000 (08:20 +0000)]
ASTTests, ASTMatchersTests: Move clangEdit before clangAst in USEDLIB.

llvm-svn: 169236

11 years agoUntabify (in USEDLIBS, Makefile(s)).
NAKAMURA Takumi [Tue, 4 Dec 2012 08:20:35 +0000 (08:20 +0000)]
Untabify (in USEDLIBS, Makefile(s)).

llvm-svn: 169235

11 years ago[tsan] refactoring and comment changes in sanitizer_common/sanitizer_allocator{,64...
Kostya Serebryany [Tue, 4 Dec 2012 07:54:41 +0000 (07:54 +0000)]
[tsan] refactoring and comment changes in sanitizer_common/sanitizer_allocator{,64}.h. No functionality change

llvm-svn: 169234

11 years agoclang/Lex: [CMake] Update CMakefiles since r169229.
NAKAMURA Takumi [Tue, 4 Dec 2012 07:40:33 +0000 (07:40 +0000)]
clang/Lex: [CMake] Update CMakefiles since r169229.

llvm-svn: 169233

11 years agoDon't test for ASM output but for IR output.
Bill Wendling [Tue, 4 Dec 2012 07:33:40 +0000 (07:33 +0000)]
Don't test for ASM output but for IR output.

llvm-svn: 169232

11 years agotsan: better error message if we fail to intercept some function
Dmitry Vyukov [Tue, 4 Dec 2012 07:28:25 +0000 (07:28 +0000)]
tsan: better error message if we fail to intercept some function
currently the message is SIGSEGV

llvm-svn: 169231

11 years agotsan: check if PWD env var is absent
Dmitry Vyukov [Tue, 4 Dec 2012 07:27:32 +0000 (07:27 +0000)]
tsan: check if PWD env var is absent
On some programs I see:
failed to open suppressions file '<null>/testing/tsan/v2/tsan.supp'

llvm-svn: 169230

11 years agoRefactor recording the preprocessor conditional directive regions out of
Argyrios Kyrtzidis [Tue, 4 Dec 2012 07:27:05 +0000 (07:27 +0000)]
Refactor recording the preprocessor conditional directive regions out of
PreprocessingRecord and into its own class, PPConditionalDirectiveRecord.

Decoupling allows a client to use the functionality of PPConditionalDirectiveRecord
without needing a PreprocessingRecord.

llvm-svn: 169229

11 years agoIn the PreprocessingRecord, to identify the different conditional directive regions
Argyrios Kyrtzidis [Tue, 4 Dec 2012 07:26:53 +0000 (07:26 +0000)]
In the PreprocessingRecord, to identify the different conditional directive regions
use the SourceLocation at the start of the respective region, instead of a unique integer.

llvm-svn: 169228

11 years ago[libclang] Avoid copying the CompileCommand related strings when wrapping them to...
Argyrios Kyrtzidis [Tue, 4 Dec 2012 07:26:48 +0000 (07:26 +0000)]
[libclang] Avoid copying the CompileCommand related strings when wrapping them to a CXString.

llvm-svn: 169227

11 years agoIntroduce CompilationDatabase::getAllCompileCommands() that returns all
Argyrios Kyrtzidis [Tue, 4 Dec 2012 07:26:44 +0000 (07:26 +0000)]
Introduce CompilationDatabase::getAllCompileCommands() that returns all
compile commands of the database and expose it via the libclang API.

llvm-svn: 169226

11 years agoVMCoreTests/PassManagerTest.cpp: Appease msvc not to do "using llvm::Pass" in class...
NAKAMURA Takumi [Tue, 4 Dec 2012 07:25:24 +0000 (07:25 +0000)]
VMCoreTests/PassManagerTest.cpp: Appease msvc not to do "using llvm::Pass" in class template.

FIXME: I have not checked whether to be compiled on msvc11.
llvm-svn: 169225

11 years agoSort includes for all of the .h files under the 'lib' tree. These were
Chandler Carruth [Tue, 4 Dec 2012 07:12:27 +0000 (07:12 +0000)]
Sort includes for all of the .h files under the 'lib' tree. These were
missed in the first pass because the script didn't yet handle include
guards.

Note that the script is now able to handle all of these headers without
manual edits. =]

llvm-svn: 169224