]> granicus.if.org Git - clang/log
clang
9 years agoSupport noreturn in limited contexts on Objective-C message sends.
John McCall [Thu, 10 Sep 2015 22:27:50 +0000 (22:27 +0000)]
Support noreturn in limited contexts on Objective-C message sends.

rdar://6198039

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247350 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SEH] Use cleanupendpad so that WinEHPrepare gets the coloring right
Reid Kleckner [Thu, 10 Sep 2015 22:11:13 +0000 (22:11 +0000)]
[SEH] Use cleanupendpad so that WinEHPrepare gets the coloring right

Cleanupendpad is a lot like catchendpad, so we can reuse the same
EHScopeStack type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247349 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[MS ABI] Make member pointers return true for isIncompleteType
David Majnemer [Thu, 10 Sep 2015 21:52:00 +0000 (21:52 +0000)]
[MS ABI] Make member pointers return true for isIncompleteType

The type of a member pointer is incomplete if it has no inheritance
model.  This lets us reuse more general logic already embedded in clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247346 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "Generating assumption loads of vptr after ctor call (fixed)"
Piotr Padlewski [Thu, 10 Sep 2015 20:18:30 +0000 (20:18 +0000)]
Revert "Generating assumption loads of vptr after ctor call (fixed)"

It seems that there is small bug, and we can't generate assume loads
when some virtual functions have internal visibiliy
This reverts commit 982bb7d966947812d216489b3c519c9825cacbf2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247332 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMove sel-address.mm from test/CodeGenCXX to test/SemaObjCXX, it's not a codegen test.
Nico Weber [Thu, 10 Sep 2015 19:35:31 +0000 (19:35 +0000)]
Move sel-address.mm from test/CodeGenCXX to test/SemaObjCXX, it's not a codegen test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247327 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDriver: Support cfi-icall on all OSs when targeting x86/x86_64.
Peter Collingbourne [Thu, 10 Sep 2015 19:18:05 +0000 (19:18 +0000)]
Driver: Support cfi-icall on all OSs when targeting x86/x86_64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247324 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd a getDeclContextDescriptor() helper function to CGDebugInfo. (NFC)
Adrian Prantl [Thu, 10 Sep 2015 18:39:45 +0000 (18:39 +0000)]
Add a getDeclContextDescriptor() helper function to CGDebugInfo. (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247319 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SEH] Use catchret in the new EH IR like we do for C++
Reid Kleckner [Thu, 10 Sep 2015 18:39:41 +0000 (18:39 +0000)]
[SEH] Use catchret in the new EH IR like we do for C++

Also add tests for SEH with the new IRGen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247318 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CUDA] Postprocess bitcode linked in during device-side CUDA compilation.
Artem Belevich [Thu, 10 Sep 2015 18:24:23 +0000 (18:24 +0000)]
[CUDA] Postprocess bitcode linked in during device-side CUDA compilation.

Link in and internalize the symbols we need from supplied bitcode library.

Differential Revision: http://reviews.llvm.org/D11664

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247317 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CUDA] Allow trivial constructors as initializer for __shared__ variables.
Artem Belevich [Thu, 10 Sep 2015 17:26:58 +0000 (17:26 +0000)]
[CUDA] Allow trivial constructors as initializer for __shared__ variables.

Differential Revision: http://reviews.llvm.org/D12739

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247307 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebug Info: Remove an unnecessary debug type visitor.
Adrian Prantl [Thu, 10 Sep 2015 17:13:31 +0000 (17:13 +0000)]
Debug Info: Remove an unnecessary debug type visitor.
Thanks to dblaikie for spotting this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247303 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRe-commit r247218: "Fix Clang-tidy misc-use-override warnings, other minor fixes"
Hans Wennborg [Thu, 10 Sep 2015 17:07:54 +0000 (17:07 +0000)]
Re-commit r247218: "Fix Clang-tidy misc-use-override warnings, other minor fixes"

This never broke the build; it was the LLVM side, r247216, that caused problems.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247302 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoProperly close documentation /code blocks with /endcode.
Aaron Ballman [Thu, 10 Sep 2015 15:13:22 +0000 (15:13 +0000)]
Properly close documentation /code blocks with /endcode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247286 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAVX-512: Changed nidx parameter in extractf64/32 intrinsic from i8 to i32 according...
Igor Breger [Thu, 10 Sep 2015 12:55:54 +0000 (12:55 +0000)]
AVX-512: Changed nidx parameter in extractf64/32 intrinsic from i8 to i32 according to the Intel Spec

Differential Revision: http://reviews.llvm.org/D12752

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247277 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP] Generate threadprivates as TLS variables by default.
Alexey Bataev [Thu, 10 Sep 2015 12:06:58 +0000 (12:06 +0000)]
[OPENMP] Generate threadprivates as TLS variables by default.
If target supports TLS all threadprivates are generated as TLS. If target does not support TLS, use runtime calls for proper codegen of threadprivate variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247273 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP] Fix test incompatibility with Windows.
Alexey Bataev [Thu, 10 Sep 2015 11:31:04 +0000 (11:31 +0000)]
[OPENMP] Fix test incompatibility with Windows.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247270 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP] Fix test incompatibility with Windows codegen.
Alexey Bataev [Thu, 10 Sep 2015 11:09:46 +0000 (11:09 +0000)]
[OPENMP] Fix test incompatibility with Windows codegen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247268 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP] Propagate alignment from original variables to the private copies.
Alexey Bataev [Thu, 10 Sep 2015 09:48:30 +0000 (09:48 +0000)]
[OPENMP] Propagate alignment from original variables to the private copies.
Currently private copies of captured variables have default alignment. Patch makes private variables to have same alignment as original variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247260 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP] Fix test incompatibility with 32-bit platforms
Alexey Bataev [Thu, 10 Sep 2015 09:06:59 +0000 (09:06 +0000)]
[OPENMP] Fix test incompatibility with 32-bit platforms

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247255 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP] Outlined function for parallel and other regions with list of captured varia...
Alexey Bataev [Thu, 10 Sep 2015 08:12:02 +0000 (08:12 +0000)]
[OPENMP] Outlined function for parallel and other regions with list of captured variables.
Currently all variables used in OpenMP regions are captured into a record and passed to outlined functions in this record. It may result in some poor performance because of too complex analysis later in optimization passes. Patch makes to emit outlined functions for parallel-based regions with a list of captured variables. It reduces code for 2*n GEPs, stores and loads at least.
Codegen for task-based regions remains unchanged because runtime requires that all captured variables are passed in captured record.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247251 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[MS ABI] Select a pointer to member representation more often
David Majnemer [Thu, 10 Sep 2015 07:20:05 +0000 (07:20 +0000)]
[MS ABI] Select a pointer to member representation more often

Given a reference to a pointer to member whose class's inheritance model
is unspecified, make sure we come up with an inheritance model in
plausible places.  One place we were missing involved LValue to RValue
conversion, another involved unary type traits.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247248 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCFI: Introduce -fsanitize=cfi-icall flag.
Peter Collingbourne [Thu, 10 Sep 2015 02:17:40 +0000 (02:17 +0000)]
CFI: Introduce -fsanitize=cfi-icall flag.

This flag causes the compiler to emit bit set entries for functions as well
as runtime bitset checks at indirect call sites. Depends on the new function
bitset mechanism.

Differential Revision: http://reviews.llvm.org/D11857

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247238 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoEmitRecord* API change: accepts ArrayRef instead of a SmallVector (NFC)
Mehdi Amini [Thu, 10 Sep 2015 01:46:39 +0000 (01:46 +0000)]
EmitRecord* API change: accepts ArrayRef instead of a SmallVector (NFC)

This reapply a variant commit r247179 after post-commit review from
D.Blaikie.
Hopefully I got it right this time: lifetime of initializer list ends
as with any expression, which make invalid the pattern:

ArrayRef<int> Arr = { 1, 2, 3, 4};

Just like StringRef, ArrayRef shouldn't be used to initialize local
variable but only as function argument.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247233 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDon't crash when emitting a block under returns_nonnull.
John McCall [Thu, 10 Sep 2015 00:57:46 +0000 (00:57 +0000)]
Don't crash when emitting a block under returns_nonnull.

rdar://22071955

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247228 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert r247218: "Fix Clang-tidy misc-use-override warnings, other minor fixes"
Hans Wennborg [Thu, 10 Sep 2015 00:37:18 +0000 (00:37 +0000)]
Revert r247218: "Fix Clang-tidy misc-use-override warnings, other minor fixes"

Seems it broke the Polly build.
From http://lab.llvm.org:8011/builders/perf-x86_64-penryn-O3-polly-fast/builds/11687/steps/compile/logs/stdio:

In file included from /home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/lib/TableGen/Record.cpp:14:0:
/home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/include/llvm/TableGen/Record.h:369:3: error: looser throw specifier for 'virtual llvm::TypedInit::~TypedInit()'
/home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/include/llvm/TableGen/Record.h:270:11: error:   overriding 'virtual llvm::Init::~Init() noexcept (true)'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247222 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix Clang-tidy misc-use-override warnings, other minor fixes
Hans Wennborg [Thu, 10 Sep 2015 00:24:40 +0000 (00:24 +0000)]
Fix Clang-tidy misc-use-override warnings, other minor fixes

Patch by Eugene Zelenko!

Differential Revision: http://reviews.llvm.org/D12741

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247218 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoARC: Fix the precise-lifetime suppression of returns_inner_pointer
John McCall [Wed, 9 Sep 2015 23:37:17 +0000 (23:37 +0000)]
ARC: Fix the precise-lifetime suppression of returns_inner_pointer
receiver extension for message sends via property syntax.

rdar://22172983

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247209 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix access control for lookups using the Microsoft __super extension.
John McCall [Wed, 9 Sep 2015 23:04:17 +0000 (23:04 +0000)]
Fix access control for lookups using the Microsoft __super extension.

rdar://22464808

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247207 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agothread_local is not implemented for targeting cygwin yet.
NAKAMURA Takumi [Wed, 9 Sep 2015 22:51:31 +0000 (22:51 +0000)]
thread_local is not implemented for targeting cygwin yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247204 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoconvert builtin_unpredictable on a switch into metadata for LLVM
Sanjay Patel [Wed, 9 Sep 2015 22:39:06 +0000 (22:39 +0000)]
convert builtin_unpredictable on a switch into metadata for LLVM

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247203 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoGenerating assumption loads of vptr after ctor call (fixed)
Piotr Padlewski [Wed, 9 Sep 2015 22:20:28 +0000 (22:20 +0000)]
Generating assumption loads of vptr after ctor call (fixed)

Generating call assume(icmp %vtable, %global_vtable) after constructor
call for devirtualization purposes.

For more info go to:
http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html

Edit:
Fixed version because of PR24479.
After this patch got reverted because of ScalarEvolution bug (D12719)
Merged after John McCall big patch (Added Address).

http://reviews.llvm.org/D11859

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247199 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Concepts] Add diagnostic; invalid specifier on function or variable concept declaration
Nathan Wilson [Wed, 9 Sep 2015 21:48:31 +0000 (21:48 +0000)]
[Concepts] Add diagnostic; invalid specifier on function or variable concept declaration

Summary: Diagnose variable and function concept declarations when an invalid specifier appears

Reviewers: rsmith, aaron.ballman, faisalv, fraggamuffin, hubert.reinterpretcast

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D12435

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247194 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[MS ABI] Don't crash on references to pointers to members in args
David Majnemer [Wed, 9 Sep 2015 20:57:59 +0000 (20:57 +0000)]
[MS ABI] Don't crash on references to pointers to members in args

We know that a reference can always be dereferenced.  However, we don't
always know the number of bytes if the reference's pointee type is
incomplete.  This case was correctly handled but we didn't consider the
case where the type is complete but we cannot calculate its size for ABI
specific reasons.  In this specific case, a member pointer's size is
available only under certain conditions.

This fixes PR24703.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247188 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "EmitRecordWith* API change: takes an ArrayRef instead of a SmallVector (NFC)"
Mehdi Amini [Wed, 9 Sep 2015 20:35:37 +0000 (20:35 +0000)]
Revert "EmitRecordWith* API change: takes an ArrayRef instead of a SmallVector (NFC)"

This reverts commit r247179.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247183 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoEmitRecordWith* API change: takes an ArrayRef instead of a SmallVector (NFC)
Mehdi Amini [Wed, 9 Sep 2015 20:08:51 +0000 (20:08 +0000)]
EmitRecordWith* API change: takes an ArrayRef instead of a SmallVector (NFC)

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247179 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[libclang] Add missing clang_CompileCommand_* functions in libclang.exports.
Argyrios Kyrtzidis [Wed, 9 Sep 2015 18:54:16 +0000 (18:54 +0000)]
[libclang] Add missing clang_CompileCommand_* functions in libclang.exports.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247176 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix a small bug in clang where generating some temporary files would have an extra...
Argyrios Kyrtzidis [Wed, 9 Sep 2015 16:48:47 +0000 (16:48 +0000)]
Fix a small bug in clang where generating some temporary files would have an extra period before the extension.

Patch by Cameron Esfahani!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247160 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Solaris] Use the GCC Installation detector to add the C++ include paths.
Rafael Espindola [Wed, 9 Sep 2015 13:36:00 +0000 (13:36 +0000)]
[Solaris] Use the GCC Installation detector to add the C++ include paths.

Patch by Xan López!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247144 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ARM] "cortex-r5f" and "cortex-m4f" are unknown names for clang.
Alexandros Lamprineas [Wed, 9 Sep 2015 11:29:06 +0000 (11:29 +0000)]
[ARM] "cortex-r5f" and "cortex-m4f" are unknown names for clang.
The tests in test/CodeGen/arm-target-features.c are currently
passing but warning messages are suppressed. These tests are now
synchronized with the corresponding changes in Target Parser.

This patch will fix the regressions in clang caused by r247136

Differential Revision: http://reviews.llvm.org/D12722

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247138 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix vld1_lane intrinsic generation
Steven Wu [Wed, 9 Sep 2015 01:37:18 +0000 (01:37 +0000)]
Fix vld1_lane intrinsic generation

Fix a bug introduced in r246985 which causes assertion when generating
vld1_lane.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247117 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCodeGen: Add CFI unrelated cast checks to the new pointer code path.
Peter Collingbourne [Wed, 9 Sep 2015 00:01:31 +0000 (00:01 +0000)]
CodeGen: Add CFI unrelated cast checks to the new pointer code path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247105 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIntroduce __builtin_nontemporal_store and __builtin_nontemporal_load.
Michael Zolotukhin [Tue, 8 Sep 2015 23:52:33 +0000 (23:52 +0000)]
Introduce __builtin_nontemporal_store and __builtin_nontemporal_load.

Summary:
Currently clang provides no general way to generate nontemporal loads/stores.
There are some architecture specific builtins for doing so (e.g. in x86), but
there is no way to generate non-temporal store on, e.g. AArch64. This patch adds
generic builtins which are expanded to a simple store with '!nontemporal'
attribute in IR.

Differential Revision: http://reviews.llvm.org/D12313

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247104 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "[Static Analyzer] BugReporter.cpp:2869: Assertion failed: !RemainingNodes...
Devin Coughlin [Tue, 8 Sep 2015 23:50:22 +0000 (23:50 +0000)]
Revert "[Static Analyzer] BugReporter.cpp:2869: Assertion failed: !RemainingNodes.empty() && "No error node found in the trimmed graph""

This is making our internal build bot fail because it results in extra warnings being
emitted past what should be sink nodes. (There is actually an example of this in the
updated malloc.c test in the reverted commit.)

I'm working on a patch to fix the original issue by adding a new checker API to explicitly
create error nodes. This API will ensure that error nodes are always tagged in order to
prevent them from being reclaimed.

This reverts commit r246188.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247103 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCodeGen: Introduce CodeGenModule::CreateMetadataIdentifierForType.
Peter Collingbourne [Tue, 8 Sep 2015 23:01:30 +0000 (23:01 +0000)]
CodeGen: Introduce CodeGenModule::CreateMetadataIdentifierForType.

This function can be used to create a metadata identifier for a specific
type. No functionality change, but this will be used by D11857 and D12026.

Differential Revision: http://reviews.llvm.org/D12038

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247098 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang/test/Modules/ModuleDebugInfo.cpp: Add -triple %itanium to appease ms-targeted...
NAKAMURA Takumi [Tue, 8 Sep 2015 22:47:32 +0000 (22:47 +0000)]
clang/test/Modules/ModuleDebugInfo.cpp: Add -triple %itanium to appease ms-targeted builds.

I think DebugInfo tests may avoid MS stuff for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247093 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove unneeded #include.
Adrian Prantl [Tue, 8 Sep 2015 22:06:40 +0000 (22:06 +0000)]
Remove unneeded #include.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247081 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCollect SEH captures in a set instead of a vector to avoid
John McCall [Tue, 8 Sep 2015 21:15:22 +0000 (21:15 +0000)]
Collect SEH captures in a set instead of a vector to avoid
doing redundant work if a variable is used multiple times.

Fixes PR24751.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247075 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Static Analyzer] Objective-C Generics Checker improvements.
Gabor Horvath [Tue, 8 Sep 2015 21:04:14 +0000 (21:04 +0000)]
[Static Analyzer] Objective-C Generics Checker improvements.

Differential Revision: http://reviews.llvm.org/D12701

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247071 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoModule Debugging: Emit debug type information into clang ObjC modules.
Adrian Prantl [Tue, 8 Sep 2015 20:41:52 +0000 (20:41 +0000)]
Module Debugging: Emit debug type information into clang ObjC modules.

When -fmodule-format is set to "obj", emit debug info for all types
declared in a module or referenced by a declaration into the module's
object file container.

This patch adds support for Objective-C types and methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247068 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Write the options records to a separate subblock rather than writing
Richard Smith [Tue, 8 Sep 2015 19:40:14 +0000 (19:40 +0000)]
[modules] Write the options records to a separate subblock rather than writing
them directly to the control block. These are fairly large, and in a build with
lots of modules / chained PCH, we don't need to read most of them. No
functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247055 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Shave]: add a -MT option to moviCompile if there wasn't one
Douglas Katzman [Tue, 8 Sep 2015 19:29:55 +0000 (19:29 +0000)]
[Shave]: add a -MT option to moviCompile if there wasn't one

Differential Revision: http://reviews.llvm.org/D12622

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247052 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoModule Debugging: Emit debug type information into clang modules.
Adrian Prantl [Tue, 8 Sep 2015 19:20:27 +0000 (19:20 +0000)]
Module Debugging: Emit debug type information into clang modules.

When -fmodule-format is set to "obj", emit debug info for all types
declared in a module or referenced by a declaration into the module's
object file container.

This patch adds support for C and C++ types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247049 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFailing test highlighting no poisoning if dtor undeclared.
Naomi Musgrave [Tue, 8 Sep 2015 16:38:17 +0000 (16:38 +0000)]
Failing test highlighting no poisoning if dtor undeclared.

Summary:
If class or struct has not declared a destructor,
no destructor is emitted, and members are not poisoned
after destruction. This case highlights bug in current
implementation of use-after-dtor poisoning (detailed
in https://github.com/google/sanitizers/issues/596).

Reviewers: eugenis, kcc

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D12616

Only check simplest object for existence of sanitizing callback.

Rename test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247025 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix performance regression when running clang tools.
Manuel Klimek [Tue, 8 Sep 2015 15:14:06 +0000 (15:14 +0000)]
Fix performance regression when running clang tools.

Brings tool start time for a large synthetic test case down from (on my
machine) 4 seconds to 0.5 seconds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247018 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang/test/CodeGen/complex-convert.c: Appease for targeting powerpc64-*.
NAKAMURA Takumi [Tue, 8 Sep 2015 14:19:13 +0000 (14:19 +0000)]
clang/test/CodeGen/complex-convert.c: Appease for targeting powerpc64-*.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247015 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agofindDominatingStoreToReturn in CGCall.cpp didn't check if a candidate store
Jakub Kuderski [Tue, 8 Sep 2015 10:36:42 +0000 (10:36 +0000)]
findDominatingStoreToReturn in CGCall.cpp didn't check if a candidate store
instruction used the ReturnValue as pointer operand or value operand. This
led to wrong code gen - in later stages (load-store elision code) the found
store and its operand would be erased, causing ReturnValue to become a <badref>.

The patch adds a check that makes sure that ReturnValue is a pointer operand of
store instruction. Regression test is also added.

This fixes PR24386.
Differential Revision: http://reviews.llvm.org/D12400

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247003 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUpdate code owners for AST matchers / libtooling.
Manuel Klimek [Tue, 8 Sep 2015 10:31:09 +0000 (10:31 +0000)]
Update code owners for AST matchers / libtooling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247001 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix documentation of numSelectorArgs.
Manuel Klimek [Tue, 8 Sep 2015 10:11:26 +0000 (10:11 +0000)]
Fix documentation of numSelectorArgs.

Currently, the documentation for numSelectorArgs includes an incorrect
example. It shows a case where an argument of 1 will match a property
getter, but a getter will be matched only when N == 0.

This diff corrects the documentation and adds a test for numSelectorArgs(0).

Patch by Dave Lee.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246998 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclangCodeGen: Fix comments. [-Wdocumentation]
NAKAMURA Takumi [Tue, 8 Sep 2015 09:42:41 +0000 (09:42 +0000)]
clangCodeGen: Fix comments. [-Wdocumentation]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246995 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix clang/test/CodeGen/mips-varargs.c for -Asserts, possibly typo.
NAKAMURA Takumi [Tue, 8 Sep 2015 09:37:09 +0000 (09:37 +0000)]
Fix clang/test/CodeGen/mips-varargs.c for -Asserts, possibly typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246994 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAnother fix to this test, this one apparently working by
John McCall [Tue, 8 Sep 2015 09:33:33 +0000 (09:33 +0000)]
Another fix to this test, this one apparently working by
coincidence on all bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246993 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix clang/test/CodeGenCXX/alignment.cpp for -Asserts.
NAKAMURA Takumi [Tue, 8 Sep 2015 09:31:04 +0000 (09:31 +0000)]
Fix clang/test/CodeGenCXX/alignment.cpp for -Asserts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246992 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoWhen building the alloca for a local variable, set its name
John McCall [Tue, 8 Sep 2015 09:18:30 +0000 (09:18 +0000)]
When building the alloca for a local variable, set its name
separately from building the instruction so that it's
preserved even in -Asserts builds.

Employ C++'s mystical "comment" feature to discourage
breaking this in the future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246991 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove unnecessary braces; this resolves against a
John McCall [Tue, 8 Sep 2015 08:57:00 +0000 (08:57 +0000)]
Remove unnecessary braces; this resolves against a
single-pointer overload instead of the ArrayRef one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246988 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMove BlockByrefHelpers back to CodeGenModule.h to placate MSVC.
John McCall [Tue, 8 Sep 2015 08:21:11 +0000 (08:21 +0000)]
Move BlockByrefHelpers back to CodeGenModule.h to placate MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246986 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCompute and preserve alignment more faithfully in IR-generation.
John McCall [Tue, 8 Sep 2015 08:05:57 +0000 (08:05 +0000)]
Compute and preserve alignment more faithfully in IR-generation.

Introduce an Address type to bundle a pointer value with an
alignment.  Introduce APIs on CGBuilderTy to work with Address
values.  Change core APIs on CGF/CGM to traffic in Address where
appropriate.  Require alignments to be non-zero.  Update a ton
of code to compute and propagate alignment information.

As part of this, I've promoted CGBuiltin's EmitPointerWithAlignment
helper function to CGF and made use of it in a number of places in
the expression emitter.

The end result is that we should now be significantly more correct
when performing operations on objects that are locally known to
be under-aligned.  Since alignment is not reliably tracked in the
type system, there are inherent limits to this, but at least we
are no longer confused by standard operations like derived-to-base
conversions and array-to-pointer decay.  I've also fixed a large
number of bugs where we were applying the complete-object alignment
to a pointer instead of the non-virtual alignment, although most of
these were hidden by the very conservative approach we took with
member alignment.

Also, because IRGen now reliably asserts on zero alignments, we
should no longer be subject to an absurd but frustrating recurring
bug where an incomplete type would report a zero alignment and then
we'd naively do a alignmentAtOffset on it and emit code using an
alignment equal to the largest power-of-two factor of the offset.

We should also now be emitting much more aggressive alignment
attributes in the presence of over-alignment.  In particular,
field access now uses alignmentAtOffset instead of min.

Several times in this patch, I had to change the existing
code-generation pattern in order to more effectively use
the Address APIs.  For the most part, this seems to be a strict
improvement, like doing pointer arithmetic with GEPs instead of
ptrtoint.  That said, I've tried very hard to not change semantics,
but it is likely that I've failed in a few places, for which I
apologize.

ABIArgInfo now always carries the assumed alignment of indirect and
indirect byval arguments.  In order to cut down on what was already
a dauntingly large patch, I changed the code to never set align
attributes in the IR on non-byval indirect arguments.  That is,
we still generate code which assumes that indirect arguments have
the given alignment, but we don't express this information to the
backend except where it's semantically required (i.e. on byvals).
This is likely a minor regression for those targets that did provide
this information, but it'll be trivial to add it back in a later
patch.

I partially punted on applying this work to CGBuiltin.  Please
do not add more uses of the CreateDefaultAligned{Load,Store}
APIs; they will be going away eventually.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246985 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[analyzer] Apply whitespace cleanups by Honggyu Kim.
Ted Kremenek [Tue, 8 Sep 2015 03:50:52 +0000 (03:50 +0000)]
[analyzer] Apply whitespace cleanups by Honggyu Kim.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246978 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][SSE4A] Added SSE4A IR + assembly codegen builtin tests
Simon Pilgrim [Mon, 7 Sep 2015 20:10:11 +0000 (20:10 +0000)]
[X86][SSE4A] Added SSE4A IR + assembly codegen builtin tests

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246974 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][SSSE3] Added SSSE3 IR + assembly codegen builtin tests
Simon Pilgrim [Sun, 6 Sep 2015 17:06:22 +0000 (17:06 +0000)]
[X86][SSSE3] Added SSSE3 IR + assembly codegen builtin tests

Transferred SSSE3 instructions from sse-builtins.c

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246948 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86]][SSE3] Added SSE41 IR + assembly codegen builtin tests
Simon Pilgrim [Sun, 6 Sep 2015 16:38:17 +0000 (16:38 +0000)]
[X86]][SSE3] Added SSE41 IR + assembly codegen builtin tests

Transferred SSE41 instructions from sse-builtins.c

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246947 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRefactoring of how ARMTargetInfo handles default target features.
Alexandros Lamprineas [Sun, 6 Sep 2015 16:15:45 +0000 (16:15 +0000)]
Refactoring of how ARMTargetInfo handles default target features.

Differential Revision: http://reviews.llvm.org/D11299

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246946 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86]][SSE3] Added SSE3 IR + assembly codegen builtin tests
Simon Pilgrim [Sun, 6 Sep 2015 14:45:13 +0000 (14:45 +0000)]
[X86]][SSE3] Added SSE3 IR + assembly codegen builtin tests

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246945 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86]][SSE42] Added SSE42 IR + assembly codegen builtin tests
Simon Pilgrim [Sun, 6 Sep 2015 14:05:33 +0000 (14:05 +0000)]
[X86]][SSE42] Added SSE42 IR + assembly codegen builtin tests

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246944 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIndex: expose visibility attribute
Saleem Abdulrasool [Sat, 5 Sep 2015 18:53:43 +0000 (18:53 +0000)]
Index: expose visibility attribute

Expose the previously unexposed visibility attribute via the python and C
bindings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246931 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix a bug in __builtin_object_size cast removal
George Burgess IV [Fri, 4 Sep 2015 22:36:18 +0000 (22:36 +0000)]
Fix a bug in __builtin_object_size cast removal

Apparently there are many cast kinds that may cause implicit pointer
arithmetic to happen. In light of this, the cast ignoring logic
introduced in r246877 has been changed to only ignore a small set of
cast kinds, and a test for this behavior has been added.

Thanks to Richard for catching this before it became a bug report. :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246890 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRelax partial-init test case for ARM
Reid Kleckner [Fri, 4 Sep 2015 22:32:51 +0000 (22:32 +0000)]
Relax partial-init test case for ARM

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246889 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDon't crash on a self-alias declaration
Hal Finkel [Fri, 4 Sep 2015 21:49:21 +0000 (21:49 +0000)]
Don't crash on a self-alias declaration

We were crashing in CodeGen given input like this:

  int self_alias(void) __attribute__((weak, alias("self_alias")));

such a self-alias is invalid, but instead of diagnosing the situation, we'd
proceed to produce IR for both the function declaration and the alias. Because
we already had a function named 'self_alias', the alias could not be named the
same thing, and so LLVM would pick a different name ('self_alias1' for example)
for that value. When we later called CodeGenModule::checkAliases, we'd look up
the IR value corresponding to the alias name, find the function declaration
instead, and then assert in a cast to llvm::GlobalAlias. The easiest way to prevent
this is simply to avoid creating the wrongly-named alias value in the first
place and issue the diagnostic there (instead of in checkAliases). We detect a
related cycle case in CodeGenModule::EmitAliasDefinition already, so this just
adds a second such check.

Even though the other test cases for this 'alias definition is part of a cycle'
diagnostic are in test/Sema/attr-alias-elf.c, I've added a separate regression
test for this case. This is because I can't add this check to
test/Sema/attr-alias-elf.c without disturbing the other test cases in that
file. In order to avoid construction of the bad IR values, this diagnostic
is emitted from within CodeGenModule::EmitAliasDefinition (and the relevant
declaration is not added to the Aliases vector). The other cycle checks are
done within the CodeGenModule::checkAliases function based on the Aliases
vector, called from CodeGenModule::Release.  However, if there have been errors
earlier, HandleTranslationUnit does not call Release, and so checkAliases is
never called, and so none of the other diagnostics would be produced.

Fixes PR23509.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246882 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix crash on invalid if we can't find a suitable PCH file in a specified
Richard Smith [Fri, 4 Sep 2015 21:44:32 +0000 (21:44 +0000)]
Fix crash on invalid if we can't find a suitable PCH file in a specified
directory, and our frontend action cares whether the frontend setup actually
succeeded.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246881 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDon't use unreachable as a placeholder, it confuses EmitBlock
Reid Kleckner [Fri, 4 Sep 2015 21:39:15 +0000 (21:39 +0000)]
Don't use unreachable as a placeholder, it confuses EmitBlock

This fixes an issue raised in D12412, where we generated invalid IR.

Thanks to Vedant Kumar for coming up with the initial work around.

Differential Revision: http://reviews.llvm.org/D12412

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246880 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIncrease accuracy of __builtin_object_size.
George Burgess IV [Fri, 4 Sep 2015 21:28:13 +0000 (21:28 +0000)]
Increase accuracy of __builtin_object_size.

Improvements:

- For all types, we would give up in a case such as:
    __builtin_object_size((char*)&foo, N);
  even if we could provide an answer to
    __builtin_object_size(&foo, N);
  We now provide the same answer for both of the above examples in all
  cases.

- For type=1|3, we now support subobjects with unknown bases, as long
  as the designator is valid.

Thanks to Richard Smith for the review + design planning.

Review: http://reviews.llvm.org/D12169

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246877 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDon't allow dllexport/import on static local variables
Hans Wennborg [Fri, 4 Sep 2015 19:59:39 +0000 (19:59 +0000)]
Don't allow dllexport/import on static local variables

They might technically have external linkage, but it still doesn't make sense
for the user to try and export such variables. This matches MSVC's and MinGW's
behaviour.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246864 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFixing a bug where hasType(decl()) would fail to match on C code involving structs...
Aaron Ballman [Fri, 4 Sep 2015 18:34:48 +0000 (18:34 +0000)]
Fixing a bug where hasType(decl()) would fail to match on C code involving structs or unions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246860 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoPut ext_implicit_lib_function_decl in ImplicitFunctionDeclare.
Ed Schouten [Fri, 4 Sep 2015 16:07:39 +0000 (16:07 +0000)]
Put ext_implicit_lib_function_decl in ImplicitFunctionDeclare.

If we build with -Werror=implicit-function-declaration, only implicit
function declarations of non-library functions throw compiler errors.
For library functions, we only produce a warning. There is no way to
promote both of these cases to an error without promoting other
warnings.

It makes little sense to introduce an additional compiler flag just to
control this specific warning. In my opinion it should just be part of
the same group.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246857 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP] Fix false diagnostic on instantiation-dependent exprs for atomic constructs.
Alexey Bataev [Fri, 4 Sep 2015 12:55:50 +0000 (12:55 +0000)]
[OPENMP] Fix false diagnostic on instantiation-dependent exprs for atomic constructs.
Some of instantiation-dependent expressions could cause false diagnostic to be emitted about unsupported atomic constructs. Relaxed rules for detection of incorrect expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246853 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang/test/SemaCXX/sourceranges.cpp: Fix silly expressions. Sorry for the breakage.
NAKAMURA Takumi [Fri, 4 Sep 2015 11:49:36 +0000 (11:49 +0000)]
clang/test/SemaCXX/sourceranges.cpp: Fix silly expressions. Sorry for the breakage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246850 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang/test/SemaCXX/sourceranges.cpp: Appease win32. Class method is thiscall for...
NAKAMURA Takumi [Fri, 4 Sep 2015 11:40:31 +0000 (11:40 +0000)]
clang/test/SemaCXX/sourceranges.cpp: Appease win32. Class method is thiscall for targeting i686-(msvc|mingw32).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246849 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP] Fix for http://llvm.org/PR24674: assertion failed and and abort trap
Alexey Bataev [Fri, 4 Sep 2015 11:26:21 +0000 (11:26 +0000)]
[OPENMP] Fix for http://llvm.org/PR24674: assertion failed and and abort trap
Fix processing of shared variables with reference types in OpenMP constructs. Previously, if the variable was not marked in one of the private clauses, the reference to this variable was emitted incorrectly and caused an assertion later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246846 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix the perentheses location when the constructor is called on a class that has a...
Olivier Goffart [Fri, 4 Sep 2015 10:17:10 +0000 (10:17 +0000)]
Fix the perentheses location when the constructor is called on a class that has a destructor

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246844 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix a couple of \param(s) in r246815. [-Wdocumentation]
NAKAMURA Takumi [Fri, 4 Sep 2015 05:19:31 +0000 (05:19 +0000)]
Fix a couple of \param(s) in r246815. [-Wdocumentation]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246838 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCleanups, no functionality change.
Richard Smith [Fri, 4 Sep 2015 04:09:21 +0000 (04:09 +0000)]
Cleanups, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246837 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86-64] Allow additional register names in inline assembler.
Alexey Bataev [Fri, 4 Sep 2015 03:42:23 +0000 (03:42 +0000)]
[X86-64] Allow additional register names in inline assembler.
Patch allows to recognize additional registers x8d, x8b, x8w - x15d, x15b, x15w in inline assembler, already recognized by backend
Differential Revision: http://reviews.llvm.org/D12594

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246835 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix a potential APInt memory leak when using __attribute__((flag_enum)), and
Richard Smith [Fri, 4 Sep 2015 01:03:03 +0000 (01:03 +0000)]
Fix a potential APInt memory leak when using __attribute__((flag_enum)), and
simplify the implementation a bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246830 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUntabify.
Eric Christopher [Fri, 4 Sep 2015 00:15:47 +0000 (00:15 +0000)]
Untabify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246826 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Static Analyzer] Remove sinks from nullability checks.
Gabor Horvath [Thu, 3 Sep 2015 23:16:21 +0000 (23:16 +0000)]
[Static Analyzer] Remove sinks from nullability checks.

Differential Revision: http://reviews.llvm.org/D12445

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246818 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRefactored dtor sanitizing into EHScopeStack
Naomi Musgrave [Thu, 3 Sep 2015 23:02:30 +0000 (23:02 +0000)]
Refactored dtor sanitizing into EHScopeStack

Summary:
Dtor sanitization handled amidst other dtor cleanups,
between cleaning bases and fields. Sanitizer call pushed onto
stack of cleanup operations.

Reviewers: eugenis, kcc

Differential Revision: http://reviews.llvm.org/D12022

Refactoring dtor sanitizing emission order.

- Support multiple inheritance by poisoning after
 member destructors are invoked, and before base
 class destructors are invoked.
- Poison for virtual destructor and virtual bases.
- Repress dtor aliasing when sanitizing in dtor.
- CFE test for dtor aliasing, and repression of aliasing in dtor
 code generation.
- Poison members on field-by-field basis, with collective poisoning
 of trivial members when possible.
- Check msan flags and existence of fields, before dtor sanitizing,
 and when determining if aliasing is allowed.
- Testing sanitizing bit fields.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246815 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WebAssembly] Initial WebAssembly support in clang
Dan Gohman [Thu, 3 Sep 2015 22:51:53 +0000 (22:51 +0000)]
[WebAssembly] Initial WebAssembly support in clang

This implements basic support for compiling (though not yet assembling
or linking) for a WebAssembly target. Note that ABI details are not yet
finalized, and may change.

Differential Revision: http://reviews.llvm.org/D12002

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246814 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoThread safety analysis: the NO_THREAD_SAFETY_ANALYSIS attribute will now
DeLesley Hutchins [Thu, 3 Sep 2015 21:14:22 +0000 (21:14 +0000)]
Thread safety analysis: the NO_THREAD_SAFETY_ANALYSIS attribute will now
disable checking of arguments to the function, which is done by
-Wthread-safety-reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246806 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd target flag to clang-cl invocation in this test.
Alexey Samsonov [Thu, 3 Sep 2015 20:53:14 +0000 (20:53 +0000)]
Add target flag to clang-cl invocation in this test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246804 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix PR23472þ by emitting initialized variable and its guard in the same COMDAT only...
Yaron Keren [Thu, 3 Sep 2015 20:33:29 +0000 (20:33 +0000)]
Fix PR23472þ by emitting initialized variable and its guard in the same COMDAT only for ELF objects.

 http://llvm.org/pr23472

Reviewed by Reid Kleckner.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246803 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd -target flag to Clang invocations in this test.
Alexey Samsonov [Thu, 3 Sep 2015 19:11:42 +0000 (19:11 +0000)]
Add -target flag to Clang invocations in this test.

ASan may not be supported for the default target triple.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246795 91177308-0d34-0410-b5e6-96231b3b80d8