Commit Graph

150283 Commits

Author SHA1 Message Date
Rui Ueyama 9e56839a83 [lld][PECOFF] Add WinLinkDriver and PECOFFTargetInfo.
Add WinLinkDriver and connect it to the existing COFF reader. Remaining
parts are still stubs, so while it can now read a COFF file, it still
cannot link or output PE/COFF files yet.

Reviewers: Bigcheese

CC: llvm-commits

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

llvm-svn: 182784
2013-05-28 18:13:31 +00:00
Chad Rosier 1bbbb3128a Remove the MCRegAliasIterator tables and compute the aliases dynamically.
The size reduction in the RegDiffLists are rather dramatic.  Here are a few
size differences for MCTargetDesc.o files (before and after) in bytes:
R600 - 36160B - 11184B - 69% reduction
ARM - 28480B - 8368B - 71% reduction
Mips - 816B - 576B - 29% reduction

One side effect of dynamically computing the aliases is that the iterator does
not guarantee that the entries are ordered or that duplicates have been removed.
The documentation implies this is a safe assumption and I found no clients that
requires these attributes (i.e., strict ordering and uniqueness).

My local LNT tester results showed no execution-time failures or significant
compile-time regressions (i.e., beyond what I would consider noise) for -O0g,
-O2 and -O3 runs on x86_64 and i386 configurations.
rdar://12906217

llvm-svn: 182783
2013-05-28 18:08:48 +00:00
Enrico Granata 2db281e910 <rdar://problem/13863031>
Giving a timeout for the call to NSPrintForDebugger() that happens when you “po” objects

This is a temporary workaround until a more detailed solution to the general problem of canceling actions is found

llvm-svn: 182782
2013-05-28 18:02:49 +00:00
Fariborz Jahanian 615de765ab Patch to issue error when target of MacOS and iOS
does not support large load/store of atomic objects.
// rdar://13973577

llvm-svn: 182781
2013-05-28 17:37:39 +00:00
Anna Zaks bac964e14f [analyzer] Use a more generic MemRegion.getAsOffset to evaluate bin operators on MemRegions
In addition to enabling more code reuse, this suppresses some false positives by allowing us to
compare an element region to its base. See the ptr-arith.cpp test cases for an example.

llvm-svn: 182780
2013-05-28 17:31:43 +00:00
Benjamin Kramer 262b154247 Simplify code. No functionality change.
llvm-svn: 182779
2013-05-28 16:39:36 +00:00
Benjamin Kramer 351d53c225 Remove double semicolons.
llvm-svn: 182778
2013-05-28 16:31:26 +00:00
Daniel Jasper 4d03d3b327 Fix formatting regression regarding pointers to arrays.
Before: f( (*PointerToArray)[10]);
After:  f((*PointerToArray)[10]);

This fixes llvm.org/PR16163

llvm-svn: 182777
2013-05-28 15:27:10 +00:00
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