Commit Graph

150275 Commits

Author SHA1 Message Date
James Molloy f6f121e277 Extend RemapInstruction and friends to take an optional new parameter, a ValueMaterializer.
Extend LinkModules to pass a ValueMaterializer to RemapInstruction and friends to lazily create Functions for lazily linked globals. This is a big win when linking small modules with large (mostly unused) library modules.

llvm-svn: 182776
2013-05-28 15:17:05 +00:00
Evgeniy Stepanov 40d7ed5d1e [sanitizer] Improve getaddrinfo interceptor.
llvm-svn: 182775
2013-05-28 14:34:37 +00:00
Evgeniy Stepanov dd0780f81c [msan] Change report header to be more alike to ASan and TSan.
llvm-svn: 182774
2013-05-28 14:27:30 +00:00
Rafael Espindola eee0a3abff Fix a crash when we were trying to compute the linkage too early.
llvm-svn: 182773
2013-05-28 14:09:46 +00:00
Manuel Klimek 591ab5a830 Make UnwrappedLines and AnnotatedToken contain pointers to FormatToken.
The FormatToken is now not copyable any more.

llvm-svn: 182772
2013-05-28 13:42:28 +00:00
Evgeniy Stepanov fca012334b [msan] Fix argument shadow alignment.
llvm-svn: 182771
2013-05-28 13:07:43 +00:00
Peter Collingbourne a7887bf8be [nolibc] Add a test case for Linux/x86_64.
Differential Revision: http://llvm-reviews.chandlerc.com/D873

llvm-svn: 182770
2013-05-28 12:37:34 +00:00
NAKAMURA Takumi ad3af1ae4d clang/test/Driver/dyld-prefix.c: Exclude MSYS bash.
llvm-svn: 182769
2013-05-28 12:18:56 +00:00
Manuel Klimek 15dfe7ac40 A first step towards giving format tokens pointer identity.
With this patch, we create all tokens in one go before parsing and pass
an ArrayRef<FormatToken*> to the UnwrappedLineParser. The
UnwrappedLineParser is switched to use pointer-to-token internally.

The UnwrappedLineParser still copies the tokens into the UnwrappedLines.
This will be fixed in an upcoming patch.

llvm-svn: 182768
2013-05-28 11:55:06 +00:00
Daniel Jasper bca4bbe30a Initial support for designated initializers.
llvm-svn: 182767
2013-05-28 11:30:49 +00:00
Renato Golin 467e256493 Typo
llvm-svn: 182766
2013-05-28 11:28:37 +00:00
Peter Collingbourne fb1a9f17e3 [nolibc] Make SymbolizerPrepareForSandboxing weak and optional.
Differential Revision: http://llvm-reviews.chandlerc.com/D872

llvm-svn: 182765
2013-05-28 11:05:05 +00:00
Richard Sandiford 0fb90ab0cb [SystemZ] Register compare-and-branch support
This patch adds support for the CRJ and CGRJ instructions.  Support for
the immediate forms will be a separate patch.

The architecture has a large number of comparison instructions.  I think
it's generally better to concentrate on using the "best" comparison
instruction first and foremost, then only use something like CRJ if
CR really was the natual choice of comparison instruction.  The patch
therefore opportunistically converts separate CR and BRC instructions
into a single CRJ while emitting instructions in ISelLowering.

llvm-svn: 182764
2013-05-28 10:41:11 +00:00
Renato Golin c08f218b48 Linking ReleaseProcess doc with the world
llvm-svn: 182763
2013-05-28 10:32:55 +00:00
Richard Sandiford 53c9efd9c1 [SystemZ] Tweak SystemZInstrInfo::isBranch() interface
This is needed for the upcoming compare-and-branch patch.  No functional
change intended.

llvm-svn: 182762
2013-05-28 10:13:54 +00:00
Alexey Samsonov 1eba4e3254 Revert r182715 and r182758
llvm-svn: 182761
2013-05-28 10:08:08 +00:00
Manuel Klimek 34d15151c4 Disable tab expansion when counting the columns in block comments.
To fully support this, we also need to expand tabs in the text before
the block comment. This patch breaks indentation when there was a
non-standard mixture of spaces and tabs used for indentation, but
fixes a regression in the simple case:
{
  /*
   * Comment.
   */
  int i;
}
Is now formatted correctly, if there were tabs used for indentation
before.

llvm-svn: 182760
2013-05-28 10:01:59 +00:00
Renato Golin 6347551e45 Adding ReleaseProcess doc
llvm-svn: 182759
2013-05-28 09:48:52 +00:00
Alexey Samsonov b262d264d4 Fixup for r182715: provide correct arg to --gtest-filter
llvm-svn: 182758
2013-05-28 09:40:42 +00:00
Manuel Klimek 281dcbe026 Fixes indentation of empty lines in block comments.
Block comment indentation of empty lines regressed, as we did not
have a test for it.
 /* Comment with...
  *
  * empty line. */
is now formatted correctly again.

llvm-svn: 182757
2013-05-28 08:55:01 +00:00
Daniel Jasper 3719428c06 Clean up formatting of function types.
Before:
int (*func)(void*);
void f() { int(*func)(void*); }

After (consistent space after "int"):
int (*func)(void*);
void f() { int (*func)(void*); }

llvm-svn: 182756
2013-05-28 08:33:00 +00:00
Michael Kuperstein f3e663af39 Make BasicAliasAnalysis recognize the fact a noalias argument cannot alias another argument, even if the other argument is not itself marked noalias.
llvm-svn: 182755
2013-05-28 08:17:48 +00:00
Daniel Jasper 9f82df295e Fix formatting of expressions containing ">>".
This gets turned into two ">" operators at the beginning in order to
simplify template parameter handling. Thus, we need a special case to
handle those two binary operators correctly.

With this patch, clang-format can now correctly handle cases like:
aaaaaa = aaaaaaa(aaaaaaa, // break
                 aaaaaa) >>
         bbbbbb;

llvm-svn: 182754
2013-05-28 07:42:44 +00:00
Jakob Stoklund Olesen 02dc6a1451 Build correct coercion types in SparcV9ABIInfo.
The coercion type serves two purposes:

 1. Pad structs to a multiple of 64 bits, so they are passed
    'left-aligned' in registers.

 2. Expose aligned floating point elements as first-level elements, so
    the code generator knows to pass them in floating point registers.

We also compute the InReg flag which indicates that the struct contains
aligned 32-bit floats. This flag is used by the code generator to pick
the right registers.

llvm-svn: 182753
2013-05-28 04:57:37 +00:00
Daniel Malea f92c4a814a Add CMake targets to build LLDB reference docs
- [ninja|make] lldb-cpp-doc builds the C++ API reference docs
- [ninja|make] lldb-python-doc builds the python API reference docs
- updated build page on website to include instructions to build docs

Tested on Linux/Mac OS X

llvm-svn: 182752
2013-05-28 03:47:34 +00:00
Daniel Malea d77e9d4565 Mac OS X CMake fix: generate LLDB version from xcodeproj
- This resolves the remaining issues related to building lldb utility/dylib
- TODO: fix up debugserver build

Patch by Ahmed Bougacha!

llvm-svn: 182751
2013-05-28 03:44:37 +00:00
Rafael Espindola e6190db8db Propagate VisibleNoLinkage down to class members.
Fixes PR16114.

llvm-svn: 182750
2013-05-28 02:22:10 +00:00
Rafael Espindola 692177e2d6 use getLVForDecl for consistency.
No intended functionality change.

llvm-svn: 182749
2013-05-28 02:13:28 +00:00
Rafael Espindola eaf53276f7 Make it explicit that GlobalAlias are ok in llvm.used.
No functionality change.

llvm-svn: 182747
2013-05-27 22:47:09 +00:00
Rafael Espindola f30f2cce50 Make helper functions static.
And remove header and cpp file that are empty after that.

llvm-svn: 182746
2013-05-27 22:34:59 +00:00
Jakob Stoklund Olesen d28ab7e802 Add a SparcV9ABIInfo class for handling the standard SPARC v9 ABI.
- All integer arguments smaller than 64 bits are extended.
- Large structs are passed indirectly, not using 'byval'.
- Structs up to 32 bytes in size are returned in registers.

Some things are not implemented yet:

- EmitVAArg can be implemented in terms of the va_arg instruction.
- When structs are passed in registers, float members require special
  handling because they are passed in the floating point registers.
- Structs are left-aligned when passed in registers. This may require
  padding.

llvm-svn: 182745
2013-05-27 21:48:25 +00:00
Peter Collingbourne 9d9e1fc479 Driver: implement --dyld-prefix option.
This option is used to select a dynamic loader prefix to be used
at runtime. Currently this is implemented for the Linux toolchain.

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

llvm-svn: 182744
2013-05-27 21:40:20 +00:00
Peter Collingbourne 5b2669049a [nolibc] Make AddressInfo::Clear a weak function.
llvm-svn: 182743
2013-05-27 21:00:36 +00:00
David Blaikie 8f6a2972ce Remove unreachable return
llvm-svn: 182742
2013-05-27 20:43:54 +00:00
Daniel Jasper 1eff9080af Improve formatting of templates.
Before: A < int&& > a;
After:  A<int &&> a;

Also remove obsolete FIXMEs.

llvm-svn: 182741
2013-05-27 16:36:33 +00:00
Peter Collingbourne 123473d243 Use an address-of operator here to silence an MSVC warning.
llvm-svn: 182740
2013-05-27 16:02:19 +00:00
Preston Gurd 048f99de11 Convert sqrt functions into sqrt instructions when -ffast-math is in effect.
When -ffast-math is in effect (on Linux, at least), clang defines
__FINITE_MATH_ONLY__ > 0 when including <math.h>. This causes the
preprocessor to include <bits/math-finite.h>, which renames the sqrt functions.
For instance, "sqrt" is renamed as "__sqrt_finite". 

This patch adds the 3 new names in such a way that they will be treated
as equivalent to their respective original names.

llvm-svn: 182739
2013-05-27 15:44:35 +00:00
Manuel Klimek 9043c74f49 Major refactoring of BreakableToken.
Unify handling of whitespace when breaking protruding tokens with other
whitespace replacements.

As a side effect, the BreakableToken structure changed significantly:
- have a common base class for single-line breakable tokens, as they are
  much more similar
- revamp handling of multi-line comments; we now calculate the
  information about lines in multi-line comments similar to normal
  tokens, and always issue replacements

As a result, we were able to get rid of special casing of trailing
whitespace deletion for comments in the whitespace manager and the
BreakableToken and fixed bugs related to tab handling and escaped
newlines.

llvm-svn: 182738
2013-05-27 15:23:34 +00:00
Rafael Espindola 111bb2ef8d Fix the linkage of local types in inline VisibleNoLinkage functions.
We were handling only local types in inline External functions before.

llvm-svn: 182737
2013-05-27 14:50:21 +00:00
Ariel J. Bernal 1d66e366e9 Fix UseAuto replacing declaration lists with new expressions
UseAuto used to replace declarion lists with new expressons where some
variable were not initialized with new.
This fix checks that every DeclStmt has a VarDecl with an initializer and it
also ensures that all declarations have the same type.

Added tests for multiple declarations and for typedefs.

llvm-svn: 182736
2013-05-27 14:30:23 +00:00
Rafael Espindola b97e89691d Move 3 helper function to Linkage.h
This removes a duplicate from Decl.cpp and a followup patch will use
isExternallyVisible.

llvm-svn: 182735
2013-05-27 14:14:42 +00:00
Rafael Espindola cca5f562db Add a cpu to try to bring back the atom bots.
llvm-svn: 182734
2013-05-27 13:22:52 +00:00
Daniel Jasper 7b27a10b1e Improve indentation of assignments.
Before:
unsigned OriginalStartColumn = SourceMgr.getSpellingColumnNumber(
    Current.FormatTok.getStartOfNonWhitespace()) -
                               1;

After:
unsigned OriginalStartColumn =
    SourceMgr.getSpellingColumnNumber(
        Current.FormatTok.getStartOfNonWhitespace()) -
    1;

llvm-svn: 182733
2013-05-27 12:45:09 +00:00
Manuel Klimek 75081b5cf8 Address post-review comment from dblakie.
llvm-svn: 182732
2013-05-27 12:36:28 +00:00
Daniel Jasper 32a796bc5b Fix hacky way of preventing a certain type of line break.
In general, we like to avoid line breaks like:

  ...
  SomeParameter, OtherParameter).DoSomething(
  ...

as they tend to make code really hard to read (how would you even indent the
next line?). Previously we have implemented this in a hacky way, which has now
shown to lead to problems. This fixes a few weird looking formattings, such as:

Before:
aaaaa(
    aaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
        .aaaaa(aaaaa),
    aaaaaaaaaaaaaaaaaaaaa);
After:
aaaaa(aaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
            aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa).aaaaa(aaaaa),
      aaaaaaaaaaaaaaaaaaaaa);

llvm-svn: 182731
2013-05-27 11:50:16 +00:00
Sergey Matveev 39e8a6d87e [lsan] Begin converting LSan tests to output tests.
In this CL all old tests are removed and one LIT test is added.

llvm-svn: 182730
2013-05-27 11:41:46 +00:00
Sergey Matveev 1814e9eae3 Add -fsanitize=leak to driver options.
If -fsanitize=leak is specified, link the program with the
LeakSanitizer runtime. Ignore this option when -fsanitize=address is specified,
because AddressSanitizer has this functionality built in.

llvm-svn: 182729
2013-05-27 11:17:01 +00:00
Sergey Matveev 9cda3df8bd [sanitizer] Move FindThreadByOSIdLocked from lsan to sanitizer_common.
llvm-svn: 182728
2013-05-27 10:35:51 +00:00
Alexey Samsonov 9c2bcf8c15 Improve support for compiler-rt tests in CMake build.
Now compiler-rt tests run correctly if compiler-rt is checked out into
arbitrary directory (not necessarily projects/compiler-rt).
Patch by Greg Fitzgerald!

llvm-svn: 182726
2013-05-27 09:35:24 +00:00
Hal Finkel 8ebfe6c263 PPC: Add a isConsecutiveLS utility function
isConsecutiveLS is a slightly more general form of
SelectionDAG::isConsecutiveLoad. Aside from also handling stores, it also does
not assume equality of the chain operands is necessary. In the case of the PPC
backend, this chain condition is checked in a more general way by the
surrounding code.

Mostly, this part of the refactoring in preparation for supporting optimized
unaligned stores.

llvm-svn: 182723
2013-05-27 02:06:39 +00:00