| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without them they can be merged with non unnamed_addr constants during LTO.
The resulting constant is not unnamed_addr and goes in a different section,
which causes ld64 to crash.
A testcase that would crash before:
* file1.mm:
void g(id notification) {
[notification valueForKey:@"name"];
}
* file2.cpp:
extern const char js_name_str[] = "name";
* file3.cpp
extern bool JS_GetProperty(const char *name);
extern const char js_name_str[];
bool js_ReportUncaughtException() { JS_GetProperty(js_name_str); }
run
clang file1.mm -o file1.o -c -w -emit-llvm
clang file2.cpp -o file2.o -c -w -emit-llvm
clang file3.cpp -o file3.o -c -w
ld -dylib -o XUL file1.o file2.o file3.o -undefined dynamic_lookup.
llvm-svn: 199688
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a perennial source of confusion in the clang type system: Declarations and
function prototypes have parameters to which arguments are supplied, so calling
these 'arguments' was a stretch even in C mode, let alone C++ where default
arguments, templates and overloading make the distinction important to get
right.
Readability win across the board, especially in the casting, ADL and
overloading implementations which make a lot more sense at a glance now.
Will keep an eye on the builders and update dependent projects shortly.
No functional change.
llvm-svn: 199686
|
| |
|
|
|
|
| |
Thanks to David Blaikie for the push.
llvm-svn: 199685
|
| |
|
|
| |
llvm-svn: 199665
|
| |
|
|
|
|
|
|
|
| |
Currently it tracks the number of free registers, but soon it will track
stack offsets for inalloca lowering.
No functional change.
llvm-svn: 199532
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit r199475 (which reverted r199416) with fixes for the
breakages.
We wouldn't lock an inheritance model if we saw a pointer-to-member
formed as a result of the address-of operator.
llvm-svn: 199482
|
| |
|
|
|
|
|
|
|
|
|
|
| |
It broke tests for targeting x86_64-pc-win32:
Clang Tools :: clang-modernize/LoopConvert/array.cpp
Clang :: CodeGenCXX/2010-05-10-Var-DbgInfo.cpp
Clang :: CodeGenCXX/member-call-parens.cpp
Clang :: CodeGenCXX/ptr-to-datamember.cpp
Clang :: SemaTemplate/instantiate-function-1.cpp
llvm-svn: 199475
|
| |
|
|
|
|
|
|
|
| |
class and use it pervasively to restore debug locations.
Fixes an interaction between cleanup and EH that caused the location
to not be restored properly after emitting a landing pad.
rdar://problem/15208190
llvm-svn: 199444
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The MSVC ABI is rather finicky about the exact representation of it's
pointer-to-member representation. The exact position of when and where
it will go with one representation versus another appears to be when it
desires the pointer-to-member to be complete.
To properly implement this in clang, do several things:
- Give up on tracking the polymorphic nature of the class. It isn't
useful to Sema and is only pertinent when choosing CodeGen-time
details like whether the field-offset can be 0 instead of -1.
- Insist on locking-in the inheritance model when we ask our
pointer-to-member type to be complete. From there, grab the
underlying CXXRecordDecl and try to make *that* complete. Once we've
done this, we can calculate it's inheritance model and apply it using
an attribute.
N.B. My first bullet point is a lie. We will eventually care about the
specifics of whether or not a CXXRecordDecl is or is not polymorphic
because MSVC compatible mangling of such things depends on it. However,
I believe we will handle this in a rather different way.
llvm-svn: 199416
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
flag from clang, and disable zero-base shadow support on all platforms
where it is not the default behavior.
- It is completely unused, as far as we know.
- It is ABI-incompatible with non-zero-base shadow, which means all
objects in a process must be built with the same setting. Failing to
do so results in a segmentation fault at runtime.
- It introduces a backward dependency of compiler-rt on user code,
which is uncommon and complicates testing.
This is the Clang part of a larger change.
llvm-svn: 199372
|
| |
|
|
|
|
|
|
|
|
| |
marked as AlwaysInline or ForceInline.
This moves us to what gcc does with -fno-inline. The attribute approach
was discussed to be better than switching to InlineAlways inliner in presence
of LTO.
llvm-svn: 199324
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Way back in r129652 we tried to avoid emitting an empty block at -O0
for switch cases that did nothing but break. This led to a poor
debugging experience as reported in PR9796, so we disabled the
optimization for -O0 but left it in for higher optimization levels in
r154420.
Since the whole point of this was to improve -O0, it's silly to keep
the complexity at all.
llvm-svn: 199302
|
| |
|
|
| |
llvm-svn: 199258
|
| |
|
|
| |
llvm-svn: 199257
|
| |
|
|
|
|
| |
parameter because the required information is encoded in the spelling. Added an appropriate subject to the attribute, and simplified the semantic checking (which will likely be expanded upon in a future patch). Also, removed the GNU spelling since it was unsupported in the first place.
llvm-svn: 199229
|
| |
|
|
|
|
|
| |
With the old linkage types removed, set the linkage to external for both
dllimport and dllexport to reflect what's currently supported.
llvm-svn: 199220
|
| |
|
|
|
|
|
|
|
| |
Record layout will tell us the offset of a shared vbptr inside a
non-virtual base.
No functionality change.
llvm-svn: 199171
|
| |
|
|
|
|
|
|
| |
Fixes PR18435, where we generated a base ctor instead of a complete
ctor, and so failed to construct virtual bases when constructing the
complete object.
llvm-svn: 199160
|
| |
|
|
| |
llvm-svn: 199140
|
| |
|
|
|
|
|
|
| |
adjustFallThroughCount isn't a good name, and the documentation was
even worse. This commit attempts to clarify what it's for and when to
use it.
llvm-svn: 199139
|
| |
|
|
|
|
|
|
| |
There are a number of places where we do PGO.setCurrentRegionCount(0)
directly after an unconditional branch. Give this operation a name so
that it's clearer why we're doing this.
llvm-svn: 199138
|
| |
|
|
|
|
|
|
| |
This call looks like it was an artifact of an earlier change, and
doesn't actually make sense. We begin a new region immediately anyway,
so it was mostly harmless.
llvm-svn: 199137
|
| |
|
|
| |
llvm-svn: 199136
|
| |
|
|
| |
llvm-svn: 199126
|
| |
|
|
|
|
| |
IR library in LLVM r199082.
llvm-svn: 199083
|
| |
|
|
|
|
| |
added in LLVM r199078.
llvm-svn: 199079
|
| |
|
|
|
|
| |
update in LLVM r199044.
llvm-svn: 199045
|
| |
|
|
| |
llvm-svn: 199042
|
| |
|
|
| |
llvm-svn: 199037
|
| |
|
|
|
|
|
| |
variable to the return slot. Patch by David Wiberg, with test case alterations
by me.
llvm-svn: 198991
|
| |
|
|
| |
llvm-svn: 198906
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The MS abi lays out *all* non-virtual bases with leading vfptrs before
laying out non-virutal bases without vfptrs. This guarantees that the
primary base is laid out first. r198818 fixed RecordLayoutBuilder to
produce compatiable layouts. This patch fixes CGRecordLayoutBuilder to
be able to consume those layouts and produce meaningful output without
tripping any asserts about assumed incoming layout.
A test case is included that shows CGRecordLayoutBuilder in fact
produces output in the compatiable order.
llvm-svn: 198900
|
| |
|
|
|
|
|
| |
I introduced this bug in 198815. Thanks for Mark Lacey for noticing.
Unfortunately, I have no idea how to test this code.
llvm-svn: 198891
|
| |
|
|
|
|
|
|
|
|
|
| |
from the global address space (6.5.1 of the OpenCL 1.2 specification).
This makes clang construct the image arguments in the global address
space and generate the argument metadata with the correct address space
descriptor.
Patch by Pedro Ferreira!
llvm-svn: 198868
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This fixes the leak described in http://llvm.org/bugs/show_bug.cgi?id=18318
Reviewers: chandlerc, dblaikie
Reviewed By: chandlerc
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2474
llvm-svn: 198857
|
| |
|
|
|
|
|
|
|
| |
This patch refactors microsoft record layout to be more "natural". The
most dominant change is that vbptrs and vfptrs are injected after the
fact. This simplifies the implementation and the math for the offest
for the first base/field after the vbptr.
llvm-svn: 198818
|
| |
|
|
| |
llvm-svn: 198815
|
| |
|
|
|
|
|
|
| |
Debug info: Implement a cleaner version of r198461. For symmetry with
C and C++ don't emit an extra lexical scope for the compound statement
that is the body of an Objective-C method.
llvm-svn: 198715
|
| |
|
|
|
|
|
|
| |
within"
This reverts commit r198461.
llvm-svn: 198714
|
| |
|
|
|
|
| |
This reverts commit 198699 so we can get a cleaner patch.
llvm-svn: 198713
|
| |
|
|
|
|
|
|
|
| |
C and C++ don't emit an extra lexical scope for the compound statement
that is the body of an Objective-C method.
rdar://problem/15010825
llvm-svn: 198699
|
| |
|
|
| |
llvm-svn: 198692
|
| |
|
|
| |
llvm-svn: 198689
|
| |
|
|
|
|
|
| |
encodes the canonical rules for LLVM's style. I noticed this had drifted
quite a bit when cleaning up LLVM, so wanted to clean up Clang as well.
llvm-svn: 198686
|
| |
|
|
|
|
|
| |
I have no idea why Clang's warning doesn't fire here, looks like a Clang
bug. I'll investigate that separately.
llvm-svn: 198677
|
| |
|
|
| |
llvm-svn: 198672
|
| |
|
|
| |
llvm-svn: 198670
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
It controls everything that -flimit-debug-info used to, plus the
vtable type optimization. The old -fno-limit-debug-info option is now an
alias to -fstandalone-debug and vice versa.
Standalone is the default on Darwin until dtrace is updated to work with
non-standalone debug info (rdar://problem/15758808).
Note: I kept the LimitedDebugInfo name in CodeGenOptions::DebugInfoKind
because NoStandaloneDebugInfo sounded even more confusing.
llvm-svn: 198655
|
| |
|
|
| |
llvm-svn: 198649
|
| |
|
|
| |
llvm-svn: 198645
|