David Majnemer [Tue, 11 Nov 2014 09:58:25 +0000 (09:58 +0000)]
llvm-objdump: Skip empty sections when dumping contents
Empty sections are just noise when using objdump.
This is similar to what binutils does.
llvm-svn: 221680
Manuel Klimek [Tue, 11 Nov 2014 08:53:18 +0000 (08:53 +0000)]
Was convinced in commit comments that requiring a specific python version is the wrong approach; reverting.
llvm-svn: 221679
David Majnemer [Tue, 11 Nov 2014 08:43:57 +0000 (08:43 +0000)]
MC, COFF: Use relocations for function references inside the section
Referencing one symbol from another in the same section does not
generally require a relocation. However, the MS linker has a feature
called /INCREMENTAL which enables incremental links. It achieves this
by creating thunks to the actual function and redirecting all
relocations to point to the thunk.
This breaks down with the old scheme if you have a function which
references, say, itself. On x86_64, we would use %rip relative
addressing to reference the start of the function from out current
position. This would lead to miscompiles because other references might
reference the thunk instead, breaking function pointer equality.
This fixes PR21520.
llvm-svn: 221678
Jason Molenda [Tue, 11 Nov 2014 08:26:44 +0000 (08:26 +0000)]
Add an operator== to the RegisterNumber class; it simplifies
RegisterContextLLDB a bit more in a few places.
llvm-svn: 221677
NAKAMURA Takumi [Tue, 11 Nov 2014 07:58:06 +0000 (07:58 +0000)]
CGOpenMPRuntime.h: Fix a couple of \param(s) introduced in r221663. [-Wdocumentation]
llvm-svn: 221676
NAKAMURA Takumi [Tue, 11 Nov 2014 07:57:25 +0000 (07:57 +0000)]
[CMake] llvm-shlib: Prune redundant components, AsmPrinter, MC, and SelectionDAG.
llvm-svn: 221675
Suyog Sarda [Tue, 11 Nov 2014 07:39:27 +0000 (07:39 +0000)]
Addition to r216371 (SLP and Loop Vectorization) and r218607 where
cost model for signed division by power of 2 was improved for AArch64.
The revision r218607 missed test case for Loop Vectorization.
Adding it in this revision.
Differential Revision: http://reviews.llvm.org/D6181
llvm-svn: 221674
Craig Topper [Tue, 11 Nov 2014 07:32:32 +0000 (07:32 +0000)]
Use uint64_t as the type for the X86 TSFlag format enum. Allows removal of the VEXShift hack that was used to access the higher bits of TSFlags.
llvm-svn: 221673
Michael Kuperstein [Tue, 11 Nov 2014 07:07:40 +0000 (07:07 +0000)]
[X86] Fix pattern match for 32-to-64-bit zext in the presence of AssertSext
This fixes an issue with matching trunc -> assertsext -> zext on x86-64, which would not zero the high 32-bits. See PR20494 for details.
Recommitting - This time, with a hopefully working test.
Differential Revision: http://reviews.llvm.org/D6128
llvm-svn: 221672
Rafael Espindola [Tue, 11 Nov 2014 05:27:12 +0000 (05:27 +0000)]
Only run the gold plugin tests if gold supports the targets we test with.
This fixes pr21345.
llvm-svn: 221669
Jingyue Wu [Tue, 11 Nov 2014 05:24:04 +0000 (05:24 +0000)]
[NVPTX] Remove dead code in NVPTXTargetTransformInfo (NFC)
llvm-svn: 221668
Rafael Espindola [Tue, 11 Nov 2014 05:18:41 +0000 (05:18 +0000)]
MCAsmParserExtension has a copy of the MCAsmParser. Use it.
Base classes were storing a second copy.
llvm-svn: 221667
Rafael Espindola [Tue, 11 Nov 2014 05:11:47 +0000 (05:11 +0000)]
Add const. NFC.
This adds const to a few methods that already return const references or
creates a const version when they reterun non-const references.
llvm-svn: 221666
Rafael Espindola [Tue, 11 Nov 2014 04:58:32 +0000 (04:58 +0000)]
Don't duplicate names in comments. NFC.
llvm-svn: 221665
Rafael Espindola [Tue, 11 Nov 2014 04:49:14 +0000 (04:49 +0000)]
Don't repeat name in comment. NFC.
llvm-svn: 221664
Alexey Bataev [Tue, 11 Nov 2014 04:05:39 +0000 (04:05 +0000)]
[OPENMP] Codegen for threadprivate variables
For all threadprivate variables which have constructor/destructor emit call to void __kmpc_threadprivate_register(ident_t * <Current Location>, void *<Original Global Addr>, kmpc_ctor <Constructor>, kmpc_cctor NULL, kmpc_dtor <Destructor>);
In expressions all references to such variables are replaced by calls to void *__kmpc_threadprivate_cached(ident_t *<Current Location>, kmp_int32 <Current Thread Id>, void *<Original Global Addr>, size_t <Size of Data>, void ***<Pointer to autogenerated cache – array of private copies of threadprivate variable>);
Test test/OpenMP/threadprivate_codegen.cpp checks that codegen is correct. Also it checks that codegen is correct after serialization/deserialization and one of passes verifies debug info.
Differential Revision: http://reviews.llvm.org/D4002
llvm-svn: 221663
Richard Smith [Tue, 11 Nov 2014 03:28:50 +0000 (03:28 +0000)]
Fix parsing of fold-expressions within a cast expression. We parse the
parenthesized expression a bit differently in this case, just in case the
commas have special meaning.
llvm-svn: 221661
Sean Callanan [Tue, 11 Nov 2014 02:49:44 +0000 (02:49 +0000)]
Made the expression parser more resilient against
being asked about symbols it doesn't know about. If
it's asked about a symbol by mangled name and it finds
nothing, then it will try again with the demangled
base name.
llvm-svn: 221660
Justin Bogner [Tue, 11 Nov 2014 02:47:05 +0000 (02:47 +0000)]
InstrProf: Remove an unnecessary helper function (NFC)
VisitSubStmtRBraceState is really just Visit, as long as
VisitCompoundStatement handles braces correctly.
llvm-svn: 221659
Sean Callanan [Tue, 11 Nov 2014 02:27:22 +0000 (02:27 +0000)]
Ignore templated aggregates in the Objective-C
runtime. This eliminates potential confusion
when the compiler has to deal with these weird
types later on.
One day I'd like to actually generate the proper
templates, but this is not the day that I write
the parser code to do that.
<rdar://problem/
18887634>
llvm-svn: 221658
Quentin Colombet [Tue, 11 Nov 2014 02:23:47 +0000 (02:23 +0000)]
[X86] Custom lower UINT_TO_FP from v4f32 to v4i32, and for v8f32 to v8i32 if
AVX2 is available.
According to IACA, the new lowering has a throughput of 8 cycles instead of 13
with the previous one.
Althought this lowering kicks in some SPECs benchmarks, the performance
improvement was within the noise.
Correctness testing has been done for the whole range of uint32_t with the
following program:
uint4 v = (uint4) {0,1,2,3};
uint32_t i;
//Check correctness over entire range for uint4 -> float4 conversion
for( i = 0; i < 1U << (32-2); i++ )
{
float4 t = test(v);
float4 c = correct(v);
if( 0xf != _mm_movemask_ps( t == c ))
{
printf( "Error @ %vx: %vf vs. %vf\n", v, c, t);
return -1;
}
v += 4;
}
Where "correct" is the old lowering and "test" the new one.
The patch adds a test case for the two custom lowering instruction.
It also modifies the vector cost model, which is why cast.ll and uitofp.ll are
modified.
2009-02-26-MachineLICMBug.ll is also modified because we now hoist 7
instructions instead of 4 (3 more constant loads).
rdar://problem/
18153096>
llvm-svn: 221657
Bob Wilson [Tue, 11 Nov 2014 02:05:56 +0000 (02:05 +0000)]
Add a missing parenthesis mistakenly dropped in r221621.
llvm-svn: 221656
NAKAMURA Takumi [Tue, 11 Nov 2014 01:36:11 +0000 (01:36 +0000)]
CGExpr.cpp: Suppress a warning. [-Wunused-variable]
llvm-svn: 221655
Nick Kledzik [Tue, 11 Nov 2014 01:31:18 +0000 (01:31 +0000)]
[mach-o] Fix lazy binding offsets
The way lazy binding works in mach-o is that the linker generates a helper
function and has the stub (PLT) initially jump to it. The helper function
pushes an extra parameter then jumps into dyld. The extra parameter is an
offset into the lazy binding info where dyld will find the information about
which symbol to bind and way lazy binding pointer to update.
llvm-svn: 221654
Alexey Samsonov [Tue, 11 Nov 2014 01:26:14 +0000 (01:26 +0000)]
[Sanitizer] Refactor sanitizer options in LangOptions.
Get rid of ugly SanitizerOptions class thrust into LangOptions:
* Make SanitizeAddressFieldPadding a regular language option,
and rely on default behavior to initialize/reset it.
* Make SanitizerBlacklistFile a regular member LangOptions.
* Introduce the helper class "SanitizerSet" to represent the
set of enabled sanitizers and make it a member of LangOptions.
It is exactly the entity we want to cache and modify in CodeGenFunction,
for instance. We'd also be able to reuse SanitizerSet in
CodeGenOptions for storing the set of recoverable sanitizers,
and in the Driver to represent the set of sanitizers
turned on/off by the commandline flags.
No functionality change.
llvm-svn: 221653
Nico Weber [Tue, 11 Nov 2014 01:13:42 +0000 (01:13 +0000)]
speling.
llvm-svn: 221652
Sean Callanan [Tue, 11 Nov 2014 00:50:10 +0000 (00:50 +0000)]
Fixed two issues in the type encoding parser:
- A correctness issue: with assertions disabled,
ReadQuotedString would misbehave; and
- A performance issue: BuildType used a long
chain of if()s; I changed that to two switch
statements. That also makes the code much
nicer to step through when debugging it.
llvm-svn: 221651
Shankar Easwaran [Tue, 11 Nov 2014 00:40:38 +0000 (00:40 +0000)]
[ELF] Change order of section match.
Addressed comments from Sean silva.
llvm-svn: 221650
Shankar Easwaran [Tue, 11 Nov 2014 00:40:36 +0000 (00:40 +0000)]
Revert "Add support library."
This reverts commit r221583.
llvm-svn: 221649
Shankar Easwaran [Tue, 11 Nov 2014 00:40:32 +0000 (00:40 +0000)]
[Gnu][Driver] Use StringRef conversion functions
llvm-svn: 221648
Shawn Best [Tue, 11 Nov 2014 00:28:52 +0000 (00:28 +0000)]
Fix error handling in NativeProcessLinux::AttachToInferior: reviews.llvm.org/D6158
llvm-svn: 221647
Alexey Samsonov [Tue, 11 Nov 2014 00:22:12 +0000 (00:22 +0000)]
Move CodeGenOptions constructor out-of-line and add missing headers. NFC.
llvm-svn: 221646
Alexey Samsonov [Tue, 11 Nov 2014 00:19:46 +0000 (00:19 +0000)]
Move SanitizerKind class to a separate header. NFC.
llvm-svn: 221645
Marshall Clow [Tue, 11 Nov 2014 00:16:30 +0000 (00:16 +0000)]
EricQWF's code coverage work showed that none of the libc++ tests were exercising some code in vector<bool>. Add more tests in an attempt to get better coverage
llvm-svn: 221644
Sean Callanan [Tue, 11 Nov 2014 00:14:00 +0000 (00:14 +0000)]
Added a testcase that checks that fairly complicated
structures are parsed safely by the Objective-C runtime.
Also made some modifications to the way we parse structs
in the runtime to avoid mis-parsing @ followed by the name
of the next field.
<rdar://problem/
18887634>
llvm-svn: 221643
Zachary Turner [Tue, 11 Nov 2014 00:00:14 +0000 (00:00 +0000)]
[ProcessWindows] Implement breakpoint stop / resume on Windows.
This patch implements basic support for stopping at breakpoints
and resuming later. While a breakpoint is stopped at, LLDB will
cease to process events in the debug loop, effectively suspending
the process, and then resume later when ProcessWindows::DoResume
is called.
As a side effect, this also correctly handles the loader breakpoint
(i.e. the initial stop) so that LLDB goes through the correct state
sequence during the initial process launch.
llvm-svn: 221642
Argyrios Kyrtzidis [Mon, 10 Nov 2014 23:21:35 +0000 (23:21 +0000)]
[libclang] When initializing an ObjC object via the "[[ClassName alloc] init*]" pattern,
report the 'init*' invocation as non-dynamic via clang_Cursor_isDynamicCall.
Of course it is dynamic at runtime, but for purposes of indexing we can treat as an invocation to ClassName's init*.
Addresses rdar://
18916871.
llvm-svn: 221641
Sean Callanan [Mon, 10 Nov 2014 23:20:52 +0000 (23:20 +0000)]
Cleaned up the StringLexer a little bit. It turns
out we only want to roll back text that was in the
buffer to begin with, so it's not necessary to
provide a pushback stack.
I'm going to use this slightly cleaner API to perform
lookahead for the Objective-C runtime type parser.
llvm-svn: 221640
Chad Rosier [Mon, 10 Nov 2014 23:02:03 +0000 (23:02 +0000)]
[yaml2obj] Support AArch64 relocations.
Patch by Daniel Stewart <stewartd@codeaurora.org>!
Phabricator Revision: http://reviews.llvm.org/D6192
llvm-svn: 221639
Rafael Espindola [Mon, 10 Nov 2014 22:36:04 +0000 (22:36 +0000)]
configure.ac lives in autoconf/, not autotools/
Patch by Palmer Dabbelt!
llvm-svn: 221638
Zachary Turner [Mon, 10 Nov 2014 22:32:18 +0000 (22:32 +0000)]
[ProcessWindows] Notify process plugin when the launch succeeds.
llvm-svn: 221637
Zachary Turner [Mon, 10 Nov 2014 22:31:51 +0000 (22:31 +0000)]
Fix some compiler warnings, one of which was a legit bug.
MSVC warns that not all control paths return a value when a switch
doesn't have a default case handler. Changed explicit value checks
to a default check.
Also, it caught a case where bitwise AND was being used instead of
logical AND. I'm not sure what this fixes, but presumably it is
not covered by any kind of test case.
llvm-svn: 221636
Alexey Samsonov [Mon, 10 Nov 2014 22:27:30 +0000 (22:27 +0000)]
Propagate SanitizerKind into CodeGenFunction::EmitCheck() call.
Make sure CodeGenFunction::EmitCheck() knows which sanitizer
it emits check for. Make CheckRecoverableKind enum an
implementation detail and move it away from header.
Currently CheckRecoverableKind is determined by the type of
sanitizer ("unreachable" and "return" are unrecoverable,
"vptr" is always-recoverable, all the rest are recoverable).
This will change in future if we allow to specify which sanitizers
are recoverable, and which are not by -fsanitize-recover= flag.
No functionality change.
llvm-svn: 221635
Ben Langmuir [Mon, 10 Nov 2014 22:13:10 +0000 (22:13 +0000)]
Validate user headers even if -fmodules-validate-once-per-build-session
is enabled. Unlike system headers, we want to be more careful about
modifications to user headers, because it's still easy to edit a header
while you're building.
llvm-svn: 221634
Greg Clayton [Mon, 10 Nov 2014 21:48:12 +0000 (21:48 +0000)]
Fix comments to match the current reality.
llvm-svn: 221633
Greg Clayton [Mon, 10 Nov 2014 21:45:59 +0000 (21:45 +0000)]
Fix selectors not being objc-uniquified in the expression parser after a recent renaming in clang (clang change for revision 221451). This broke all objective C expressions in LLDB.
llvm-svn: 221632
Tim Northover [Mon, 10 Nov 2014 21:17:23 +0000 (21:17 +0000)]
AArch64: set all processor features from -arch if nothing else present
Darwin's "-arch arm64" option implies full Cyclone CPU, for both architectural
and tuning purposes. So if neither of the explicit options have been given,
forward that on to the proper invocation.
rdar://problem/
18906227
llvm-svn: 221631
Richard Smith [Mon, 10 Nov 2014 21:10:32 +0000 (21:10 +0000)]
Improve diagnostics if _Noreturn is placed after a function declarator. (This sometimes happens when a macro is used that expands to either the GNU noreturn attribute or _Noreturn.)
llvm-svn: 221630
Michael Kuperstein [Mon, 10 Nov 2014 21:07:41 +0000 (21:07 +0000)]
Reverting r221626 due to a too-strict test.
llvm-svn: 221629
Juergen Ributzka [Mon, 10 Nov 2014 21:05:31 +0000 (21:05 +0000)]
[AArch64][FastISel] Fix kill flags for integer extends.
In the case we optimize an integer extend away and replace it directly with the
source register, we also have to clear all kill flags at all its uses.
This is necessary, because the orignal IR instruction might be trivially dead,
but we replaced it with a nop at MI level.
llvm-svn: 221628
Juergen Ributzka [Mon, 10 Nov 2014 21:05:27 +0000 (21:05 +0000)]
[SwitchLowering] Fix the "fixPhis" function.
Switch statements may have more than one incoming edge into the same BB if they
all have the same value. When the switch statement is converted these incoming
edges are now coming from multiple BBs. Updating all incoming values to be from
a single BB is incorrect and would generate invalid LLVM IR.
The fix is to only update the first occurrence of an incoming value. Switch
lowering will perform subsequent calls to this helper function for each incoming
edge with a new basic block - updating all edges in the process.
This fixes rdar://problem/
18916275.
llvm-svn: 221627
Michael Kuperstein [Mon, 10 Nov 2014 20:40:21 +0000 (20:40 +0000)]
[X86] Fix pattern match for 32-to-64-bit zext in the presence of AssertSext
This fixes an issue with matching trunc -> assertsext -> zext on x86-64, which would not zero the high 32-bits.
See PR20494 for details.
Differential Revision: http://reviews.llvm.org/D6128
llvm-svn: 221626
Bob Wilson [Mon, 10 Nov 2014 20:01:19 +0000 (20:01 +0000)]
Remove change to set SDKROOT when building compiler-rt on Darwin.
This reverts the runtime library portion of r194168. As of r221621,
the libclang_rt libraries for Darwin build with explicit SDK options
so there is no need to set SDKROOT here.
llvm-svn: 221625
Enrico Granata [Mon, 10 Nov 2014 19:51:57 +0000 (19:51 +0000)]
Fix a problem reported by Ed Maste where the test harness was failing to call bound methods as cleanup hooks
llvm-svn: 221624
Richard Smith [Mon, 10 Nov 2014 19:44:15 +0000 (19:44 +0000)]
Update fold-expression mangling to match cxx-abi-dev discussion.
llvm-svn: 221623
Bob Wilson [Mon, 10 Nov 2014 19:38:18 +0000 (19:38 +0000)]
Clean up indentation after previous change.
llvm-svn: 221622
Bob Wilson [Mon, 10 Nov 2014 19:38:15 +0000 (19:38 +0000)]
Build Darwin libclang_rt libraries against real SDKs.
The minimal fake SDK was very useful in allowing us to build for all
Darwin platforms without needing access to the real SDKs, but it did
not support building any of the sanitizer runtimes. It's important to
fix that. As a consequence, if you don't have the iOS SDKs installed,
we will now skip building the iOS-specific libclang_rt libraries.
rdar://problem/
18825276
llvm-svn: 221621
Rafael Espindola [Mon, 10 Nov 2014 18:41:59 +0000 (18:41 +0000)]
Copy externally_initialized in GlobalVariable::copyAttributesFrom.
Patch by Kevin Frei!
llvm-svn: 221620
Jingyue Wu [Mon, 10 Nov 2014 18:38:25 +0000 (18:38 +0000)]
[NVPTX] Add an NVPTX-specific TargetTransformInfo
Summary:
It currently only implements hasBranchDivergence, and will be extended
in later diffs.
Split from D6188.
Test Plan: make check-all
Reviewers: jholewinski
Reviewed By: jholewinski
Subscribers: llvm-commits, meheff, eliben, jholewinski
Differential Revision: http://reviews.llvm.org/D6195
llvm-svn: 221619
Rafael Espindola [Mon, 10 Nov 2014 18:11:10 +0000 (18:11 +0000)]
Misc style fixes. NFC.
This fixes a few cases of:
* Wrong variable name style.
* Lines longer than 80 columns.
* Repeated names in comments.
* clang-format of the above.
This make the next patch a lot easier to read.
llvm-svn: 221615
Bob Wilson [Mon, 10 Nov 2014 17:46:55 +0000 (17:46 +0000)]
Only build iOS runtime libraries when the iOS SDKs are available.
This was already set up for the iOS simulator ASan dylib simulator,
and this change extends that to the other iOS runtime libraries.
This is in preparation for building all those iOS libraries against
the real SDKs instead of the fake SDKs in compiler-rt.
llvm-svn: 221614
Vasileios Kalintiris [Mon, 10 Nov 2014 17:37:53 +0000 (17:37 +0000)]
Fix extra semicolon warning. NFC.
llvm-svn: 221613
Zoran Jovanovic [Mon, 10 Nov 2014 17:27:56 +0000 (17:27 +0000)]
[mips][microMIPS] Fix issue with delay slot filler and microMIPS
Differential Revision: http://reviews.llvm.org/D6193
llvm-svn: 221612
Ed Maste [Mon, 10 Nov 2014 17:22:47 +0000 (17:22 +0000)]
Fix new noreturn test on !darwin platforms
r221575 introduced a NoreturnUnwind test that did not skip the dsym
test on non-darwin platforms, and had the @dwarf_test case as an exact
copy of the dsym case (including the test name, test_with_dsym).
llvm-svn: 221611
Bob Wilson [Mon, 10 Nov 2014 17:05:21 +0000 (17:05 +0000)]
Do not build a separate x86_64h Haswell slice for the iOS simulator.
r199996 added new x86_64h slices for all the Darwin compiler_rt libraries
that had an x86_64 slice, but that is overkill for the iOS Simulator
platform where the x86_64h slice is never used.
llvm-svn: 221610
Daniel Jasper [Mon, 10 Nov 2014 16:57:30 +0000 (16:57 +0000)]
clang-format: Fix pointer formatting.
Before:
void f(Bar* a = nullptr, Bar * b);
After:
void f(Bar* a = nullptr, Bar* b);
llvm-svn: 221609
Rafael Espindola [Mon, 10 Nov 2014 16:31:06 +0000 (16:31 +0000)]
Fix variable names and comment style. NFC.
llvm-svn: 221608
Nico Weber [Mon, 10 Nov 2014 16:30:02 +0000 (16:30 +0000)]
clang-format: [Java] Never treat @interface as annotation.
'@' followed by any keyword can't be an annotation, but @interface is currently
the only combination of '@' and a keyword that's allowed, so limit it to this
case. `@interface Foo` without a leading `public` was misformatted prior to
this patch.
llvm-svn: 221607
Nico Weber [Mon, 10 Nov 2014 16:14:54 +0000 (16:14 +0000)]
clang-format: Document that --assume-filename affects the language.
llvm-svn: 221606
Benjamin Kramer [Mon, 10 Nov 2014 16:07:58 +0000 (16:07 +0000)]
Remove unused diagnostic.
llvm-svn: 221605
Daniel Sanders [Mon, 10 Nov 2014 15:57:53 +0000 (15:57 +0000)]
[mips] Fix sret arguments for N32/N64 which were accidentally broken in r221534.
llvm-svn: 221604
Simon Atanasyan [Mon, 10 Nov 2014 15:50:22 +0000 (15:50 +0000)]
[Mips] Replace the redundant condition by assert call
No functional changes.
llvm-svn: 221603
Simon Atanasyan [Mon, 10 Nov 2014 15:50:01 +0000 (15:50 +0000)]
[Mips] Do not read addends for relocations which do not use them
No functional changes.
llvm-svn: 221602
Marshall Clow [Mon, 10 Nov 2014 15:43:20 +0000 (15:43 +0000)]
Update status pages for C++1z
llvm-svn: 221601
Alexander Kornienko [Mon, 10 Nov 2014 15:42:31 +0000 (15:42 +0000)]
[Tooling] Restore current directory after processing each file.
Summary:
If we actually change directory before processing a file, we need to
restore it afterwards. This was broken in r216620.
Added a comment for the changes in r216620.
Reviewers: klimek
Reviewed By: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D6162
llvm-svn: 221600
Viktor Kutuzov [Mon, 10 Nov 2014 15:31:56 +0000 (15:31 +0000)]
Enable running Ubsan tests on FreeBSD
Differential Revision: http://reviews.llvm.org/D6089
llvm-svn: 221599
Manuel Klimek [Mon, 10 Nov 2014 15:29:29 +0000 (15:29 +0000)]
Mark test using python as REQUIRES: python27.
llvm-svn: 221598
Viktor Kutuzov [Mon, 10 Nov 2014 15:27:13 +0000 (15:27 +0000)]
[Ubsan] Fix the missing_return.cpp test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D6088
llvm-svn: 221597
Viktor Kutuzov [Mon, 10 Nov 2014 15:25:01 +0000 (15:25 +0000)]
[Ubsan] Fix the cast-overflow.cpp test to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D6087
llvm-svn: 221596
Viktor Kutuzov [Mon, 10 Nov 2014 15:22:04 +0000 (15:22 +0000)]
[Sanitizers] Enable stack traces on FreeBSD
Differential Revision: http://reviews.llvm.org/D6086
llvm-svn: 221595
Shankar Easwaran [Mon, 10 Nov 2014 15:16:31 +0000 (15:16 +0000)]
[ELF] add missing test for max-page-size
llvm-svn: 221594
Shawn Best [Mon, 10 Nov 2014 15:06:15 +0000 (15:06 +0000)]
LLGS Android target support (r221570) missed adding some files: reviews.llvm.org/D6166
llvm-svn: 221593
NAKAMURA Takumi [Mon, 10 Nov 2014 15:04:26 +0000 (15:04 +0000)]
[CMake] llvm-c-test: Use libLLVM.so if it is available.
llvm-svn: 221592
NAKAMURA Takumi [Mon, 10 Nov 2014 15:04:02 +0000 (15:04 +0000)]
[CMake] Let llvm-shlib work on Linux with --whole-archive.
FIXME: It should work on not only Linux but elf-targeting gnu ld.
For example if LLVM_DYLIB_COMPONENTS is "BitWriter Support", CMake emits the command line like;
-Wl,--whole-archive
lib/libLLVMBitWriter.a
lib/libLLVMSupport.a *1
-Wl,--no-whole-archive
lib/libLLVMCore.a
lib/libLLVMSupport.a *2
-lrt -ldl -ltinfo -lpthread -lm
It works since symbols in LLVMCore is resolved with not *2 but *1.
Unfortunately, --gc-sections is not powerful in this case to prune unused "visibility(default)" entries.
I am still experimenting other way not to rely on --whole-archive.
llvm-svn: 221591
NAKAMURA Takumi [Mon, 10 Nov 2014 15:03:02 +0000 (15:03 +0000)]
[CMake] Move llvm-shlib in prior to other tools.
llvm-svn: 221590
Shankar Easwaran [Mon, 10 Nov 2014 14:55:21 +0000 (14:55 +0000)]
[Gnu] Support --image-base option
The value for --image-base is used as the base address of the program.
llvm-svn: 221589
Shankar Easwaran [Mon, 10 Nov 2014 14:55:11 +0000 (14:55 +0000)]
[ELF] Fix DT_INIT_ARRAY{SZ} and DT_FINI_ARRAY{SZ}
The dynamic table was creating the entry DT_FINI_ARRAY{SZ} even when there was
no .fini_array section. The entries should be creating in the dynamic section
only if there are sections .init_array/.fini_array in the output.
Fixes the tests that checked for errroneous outputs.
llvm-svn: 221588
Shankar Easwaran [Mon, 10 Nov 2014 14:55:07 +0000 (14:55 +0000)]
[ELF] Fix values of linker created dynamic variables.
The value of _DYNAMIC should be pointing at the start of the .dynamic segment.
This was pointing to the end of the dynamic segment. Similarly the value of
_GLOBAL_OFFSET_TABLE_ was not proper too.
llvm-svn: 221587
Shankar Easwaran [Mon, 10 Nov 2014 14:54:53 +0000 (14:54 +0000)]
[ELF] .dynamic should have SHT_DYNAMIC flag
llvm-svn: 221586
Shankar Easwaran [Mon, 10 Nov 2014 14:54:49 +0000 (14:54 +0000)]
[Gnu] Add options that are ignored
Add options that are ignored and exists just for compatibility reasons.
llvm-svn: 221585
Shankar Easwaran [Mon, 10 Nov 2014 14:54:43 +0000 (14:54 +0000)]
[ELF] Support -z max-page-size option
The GNU linker allows the user to change the page size by using the option -z
max-page-size.
llvm-svn: 221584
Shankar Easwaran [Mon, 10 Nov 2014 14:54:34 +0000 (14:54 +0000)]
Add support library.
The parsing routines in the linker script to parse strings encoded in various
formats(hexadecimal, octal, decimal, etc), is needed by the GNU driver too. This
library provides helper functions for all flavors and flavors to add helper
functions which other flavors may make use of.
llvm-svn: 221583
Aaron Ballman [Sat, 8 Nov 2014 17:09:50 +0000 (17:09 +0000)]
Missing testcase from r221581.
llvm-svn: 221582
Aaron Ballman [Sat, 8 Nov 2014 17:07:15 +0000 (17:07 +0000)]
Updated the wording for a diagnostic to be more grammatically correct, and use a %select. Also ensure that nested namespace definitions are diagnosed properly. Both changes are motivated by post-commit feedback from r221580.
llvm-svn: 221581
Aaron Ballman [Sat, 8 Nov 2014 15:33:35 +0000 (15:33 +0000)]
[c++1z] Support for attributes on namespaces and enumerators.
llvm-svn: 221580
NAKAMURA Takumi [Sat, 8 Nov 2014 14:12:30 +0000 (14:12 +0000)]
[CMake] llvm-shlib: Add possibly missing BitReader and MCDisassembler for llvm-c.
FYI, 3 modules below are redundant in trunk;
AsmPrinter
MC
SelectionDAG
llvm-svn: 221579
Jay Foad [Sat, 8 Nov 2014 09:51:45 +0000 (09:51 +0000)]
[ASan] Fix stack-overflow test for PowerPC
Summary:
Tweak the asan stack overflow heuristics to cope with PowerPC64 redzones,
which are larger than on x86-64: 288 bytes for big-endian and 512 bytes
for little-endian.
Reviewers: kcc, willschm, samsonov, eugenis
Reviewed By: samsonov, eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6168
llvm-svn: 221578
Jason Molenda [Sat, 8 Nov 2014 08:09:22 +0000 (08:09 +0000)]
Add a RegisterNumber class to RegisterContextLLDB.h and start using
it in RegisterContext.cpp.
There's a lot of bookkeeping code in RegisterContextLLDB where it has
to convert between different register numbering schemes and it makes
some methods like SavedLocationForRegister very hard to read or
maintain. Abstract all of the details about different register numbering
systems for a given register into this new class to make it easier
to understand what the method is doing.
Also add register name printing to all of the logging -- that's easy to
get now that I've got an object to represent the register numbers.
There were some gnarly corner cases of this method that I believe
I've translated correctly - initial testing looks good but it's
possible I missed a corner case, especially with architectures which
uses a link-register aka return address register like arm32/arm64.
Basic behavior is correct but there are a lot of corner casese that are
handled in this method ...
llvm-svn: 221577
Richard Smith [Sat, 8 Nov 2014 06:08:42 +0000 (06:08 +0000)]
[c++1z] Support for u8 character literals.
llvm-svn: 221576
Jason Molenda [Sat, 8 Nov 2014 05:38:17 +0000 (05:38 +0000)]
Fix a corner case with the handling of noreturn functions.
If a noreturn function was the last function in a section,
we wouldn't correctly back up the saved-pc value into the
correct section leading to us showing the wrong function in
the backtrace.
Also add a backtrace test with an attempt to elicit this
particular layout. It happens to work out with clang -Os
but other compilers may not quite get the same layout I'm
getting at that opt setting. We'll still be exercising the
basic noreturn handling in the unwinder even if we don't get
one function at the very end of a section.
<rdar://problem/
16051613>
llvm-svn: 221575