Commit Graph

834 Commits

Author SHA1 Message Date
Rafael Espindola e1bd71fea4 Use private linkage for utf-16 objc strings too.
llvm-svn: 199709
2014-01-21 02:57:56 +00:00
Rafael Espindola d19f80a0b4 Give explicit sections for string constants used in NSStrings.
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
2014-01-20 20:33:18 +00:00
Rafael Espindola 4f5f0b78a1 Add a triple. Should fix the 64 bit bots.
llvm-svn: 199670
2014-01-20 16:15:48 +00:00
Rafael Espindola a69024aa2a Make the test more strict.
llvm-svn: 199669
2014-01-20 15:58:59 +00:00
Hans Wennborg c9bd88e681 Remove the -cxx-abi command-line flag.
This makes the C++ ABI depend entirely on the target: MS ABI for -win32 triples,
Itanium otherwise. It's no longer possible to do weird combinations.

To be able to run a test with a specific ABI without constraining it to a
specific triple, new substitutions are added to lit: %itanium_abi_triple and
%ms_abi_triple can be used to get the current target triple adjusted to the
desired ABI. For example, if the test suite is running with the i686-pc-win32
target, %itanium_abi_triple will expand to i686-pc-mingw32.

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

llvm-svn: 199250
2014-01-14 19:35:09 +00:00
Hans Wennborg 9125b08b52 Update tests in preparation for using the MS ABI for Win32 targets
In preparation for making the Win32 triple imply MS ABI mode,
make all tests pass in this mode, or make them use the Itanium
mode explicitly.

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

llvm-svn: 199130
2014-01-13 19:48:13 +00:00
Adrian Prantl 56741e29d4 Re-applying r198699 after reverting r198461.
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
2014-01-07 22:05:55 +00:00
Adrian Prantl e83b130def Revert "Debug info: Ensure that the last stop point in a function is still within"
This reverts commit r198461.

llvm-svn: 198714
2014-01-07 22:05:52 +00:00
Adrian Prantl c6758879b3 Revert "Debug info: Implement a cleaner version of r198461. For symmetry with"
This reverts commit 198699 so we can get a cleaner patch.

llvm-svn: 198713
2014-01-07 22:05:45 +00:00
Adrian Prantl f5ff0dc29b 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.

rdar://problem/15010825

llvm-svn: 198699
2014-01-07 19:24:24 +00:00
Adrian Prantl 96e70d9148 Debug info: Ensure that the last stop point in a function is still within
the lexical block formed by the compound statement that is the function
body.

rdar://problem/15010825

llvm-svn: 198461
2014-01-03 23:34:30 +00:00
Fariborz Jahanian cb8c7da266 ObjectiveC. support "section" attribute on properties
and methods. rdar://15450637

llvm-svn: 197625
2013-12-18 23:09:57 +00:00
Aaron Ballman 0362a6d466 Implement the MSABI and SysVABI calling conventions for Objective-C method declarations. This appears to be an omission from r189644.
llvm-svn: 197584
2013-12-18 16:23:37 +00:00
Alp Toker 544bd43624 Remove duplicated -cc1 in tests
llvm-svn: 196728
2013-12-08 18:06:52 +00:00
Alp Toker f6a24ce40f Fix a tranche of comment, test and doc typos
llvm-svn: 196510
2013-12-05 16:25:25 +00:00
NAKAMURA Takumi 0acd8a7561 clang/test: REQUIRES: s/x86-64-registered-target/x86-registered-target/
llvm-svn: 196350
2013-12-04 03:41:33 +00:00
Rafael Espindola a6d47ae71c Check IR on this test.
llvm-svn: 196287
2013-12-03 14:46:31 +00:00
Aaron Ballman b8f67f2de8 Improving calling convention test coverage by adding tests for things not currently handled. Specifically: the diagnostics in SemaDeclAttr.cpp, and ensuring that calling convention attributes are applied to ObjC method declarations. No functional changes.
llvm-svn: 195098
2013-11-19 04:08:34 +00:00
Fariborz Jahanian 42d495539a ObjectiveC IRGen. Replace _objc_empty_vtable pointer in Objective-C
class metadata for certain deployment targets. // rdar://14802916

llvm-svn: 193359
2013-10-24 17:40:28 +00:00
Rafael Espindola 3bfa4688ef Emit a .ident saying that clang produced this file.
Patch by Katya Romanova.

llvm-svn: 192832
2013-10-16 19:28:50 +00:00
Rafael Espindola ea1ba0adfc Replace -fobjc-default-synthesize-properties with disable-objc-default-synthesize-properties.
We want the modern behavior most of the time, so inverting the option simplifies
the driver and the tests.

llvm-svn: 191551
2013-09-27 20:21:48 +00:00
Adrian Prantl 179af903d2 Debug info: Fix a crash when trying to construct a type with redundant
ownership qualifiers.
Fixes rdar://problem/14990656.

llvm-svn: 191463
2013-09-26 21:35:50 +00:00
Fariborz Jahanian 8a5e947454 ObjectiveC: Allow NS_RETURNS_INNER_POINTER annotation
of ObjectiveC properties to mean annotation of 
NS_RETURNS_INNER_POINTER on its synthesized getter.
This also facilitates more migration to properties when 
methods are annotated with NS_RETURNS_INNER_POINTER. 
// rdar://14990439

llvm-svn: 191009
2013-09-19 16:37:20 +00:00
Benjamin Kramer 4d6efbb28a Add a define for the ObjFW runtime ABI version.
This removes __has_feature(objc_msg_lookup_stret), as it is not required
anymore after this patch.

Patch by Jonathan Schleifer!

llvm-svn: 190791
2013-09-16 16:31:49 +00:00
Rafael Espindola ff7cea8c1a Don't pass -O0 to clang_cc1, it is the default.
llvm-svn: 189910
2013-09-04 04:12:25 +00:00
Manman Ren 4ae7ea6745 Debug Info: follow-up patch to r189283.
Thanks David for his suggestion. This commit updates testing cases
to have more specific CHECKs.

llvm-svn: 189286
2013-08-26 23:19:37 +00:00
Manman Ren c4ca9b0d3a Debug Info: add an identifier field to DICompositeType.
Paired with llvm r189282.
Update testing cases to handle an extra field for DICompositeType.

llvm-svn: 189283
2013-08-26 22:40:31 +00:00
David Blaikie eb0911f59d Simplify assert-neutral matching in test case.
Originally committed in r188651, improved/fixed to be assert-neutral by
Takumi in r188661.

llvm-svn: 188686
2013-08-19 18:35:25 +00:00
NAKAMURA Takumi 7127300e41 clang/test/CodeGenObjC/2010-02-09-DbgSelf.m: Tweak for -Asserts in r188651.
llvm-svn: 188661
2013-08-19 09:37:23 +00:00
David Blaikie 7fceebf5aa DebugInfo: Do not include line/file info for artificial parameters & parameters of artificial functions
llvm-svn: 188651
2013-08-19 03:37:48 +00:00
Stephen Lin 4362261b00 CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail.
llvm-svn: 188447
2013-08-15 06:47:53 +00:00
Tim Northover 19ae1175ae Fix FileCheck --check-prefix lines.
Various tests had sprung up over the years which had --check-prefix=ABC on the
RUN line, but "CHECK-ABC:" later on. This happened to work before, but was
strictly incorrect. FileCheck is getting stricter soon though.

Patch by Ron Ofir.

llvm-svn: 188174
2013-08-12 12:51:05 +00:00
Eli Friedman e701520ab3 Fix test for Release builds.
Attempt 2.  Sorry about the noise.

llvm-svn: 187183
2013-07-26 02:04:44 +00:00
Eli Friedman db8ea01c43 Fix test for Release builds.
llvm-svn: 187178
2013-07-26 01:21:11 +00:00
Eli Friedman f24bd3bdba Fix GNU ObjC ABI for a message returning a struct.
This allows the ObjFW runtime to correctly implement message forwarding
for messages which return a struct.

Patch by Jonathan Schleifer.

llvm-svn: 187174
2013-07-26 00:53:29 +00:00
Adrian Prantl 49a78563d2 Debug Info: Fix an oversight of r186553. Ensure that the function prologue
of an artificial function gets an artificial location as well.

llvm-svn: 187074
2013-07-24 20:34:39 +00:00
Adrian Prantl d801711efb add radar number to testcase.
llvm-svn: 187073
2013-07-24 20:34:34 +00:00
David Blaikie 613c69500d Further simplify test case from r186894
llvm-svn: 186905
2013-07-23 01:01:17 +00:00
Adrian Prantl adaeb8947a Simplify testcase.
rdar://problem/14386148

llvm-svn: 186901
2013-07-23 00:21:48 +00:00
Adrian Prantl 52f5b2502f Debug Info: Acknowledge the alignment when locating byref block variables.
Fixes rdar://problem/14386148

llvm-svn: 186894
2013-07-22 23:44:26 +00:00
Adrian Prantl 01eb2a53c7 Don't generate bogus line table entries for __copy_helper_block_ and
__destroy_helper_block_, but do generate scope information.

llvm-svn: 186553
2013-07-18 00:28:05 +00:00
Fariborz Jahanian 88890e7b50 Objective-C: Produce gcc compatible encoding of
ivar type in meta-data while preventing recursive
encoding in a corner case. // rdar://14408244

llvm-svn: 186169
2013-07-12 16:19:11 +00:00
Rafael Espindola be8a91b771 Replace 'grep foo | count 0' with 'not grep foo'.
This avoids depending on pipefail not being used.

llvm-svn: 185648
2013-07-04 15:22:16 +00:00
David Blaikie 03039fe9ba DebugInfo: handle the DI asm printing change to reword '[fwd]' as '[decl]' and add '[def]' for non-decl tag types
This is to make test cases looking for definitions more legible by
making the definition explicit rather than just the absence of '[fwd]'.
This allowed the debug-info-record tests to be rephrased - and in the
interests of reducing the number of individual test cases/invocations we
have, I merged them into one file, separated them with namespaces (&
then moved them to C++ because namespaces are great). If they need to
remain 'C' only tests, they can be moved back. (I didn't group them with
'debug-info-class.cpp' because these tests only apply to
-fno-limit-debug-info)

I removed the pieces of code that would cause these tests to pass under
-flimit-debug-info to ensure the tests remain relevant to their fixes
should we ever improve -flimit-debug-info to catch that kind of code.

This commit is version locked with the corresponding change to
DebugInfo.h in LLVM. Except some transient buildbot fallout.

llvm-svn: 184524
2013-06-21 03:41:46 +00:00
Eli Friedman 31a5bcc24e Unify return type checking for functions and ObjC methods. Move all the
random checks for ObjC object return types to SemaType.cpp.

Fixes issue with ObjC method type checking reported on cfe-dev.

llvm-svn: 184006
2013-06-14 21:14:10 +00:00
Eli Friedman 1f16b743d9 Correctly handle designated initializers which modify an array initialized
with a string.  This case is sort of tricky because we can't modify the
StringLiteral used to represent such initializers.
We are forced to decompose the string into individual characters.

Fixes <rdar://problem/10465114>.

llvm-svn: 183791
2013-06-11 21:48:11 +00:00
Eli Friedman 4871a46cc3 Make sure we don't emit invalid IR for StmtExprs with complex cleanups.
Fixes <rdar://problem/14074868>.

llvm-svn: 183699
2013-06-10 22:04:49 +00:00
Adrian Prantl b8fad1a37c ObjC Debug Info: Emit the names of accessors whenever they diverge from
the default names, not just when the isImplicit flag is set.

rdar://problem/14035789

llvm-svn: 183474
2013-06-07 01:10:45 +00:00
Fariborz Jahanian f0dc11ad7f Objective-C encoding. Fixes up encodeing for
arrays of empty structs. // rdar://14053082
(also pr13062).

llvm-svn: 183234
2013-06-04 16:04:37 +00:00
Adrian Prantl 4c9a38a47a Do not reuse the debug location of the return value's store if there is autorelease code to be emitted between store and return instructions. This is analoguous to what we do for lexical scope cleanups.
rdar://problem/13977888

llvm-svn: 182947
2013-05-30 18:12:23 +00:00
Adrian Prantl ef6fca5536 Bugfix for r181629:
- The return type should be a pointer to the class type.
- Make the condition more specific.

rdar://problem/13359718

llvm-svn: 182504
2013-05-22 19:10:15 +00:00
Adrian Prantl 6e785ec019 ObjC Debug Info: Emit the correct method names for accessors for
properties declared in a protocol.

rdar://problem/13798000

llvm-svn: 182176
2013-05-17 23:49:10 +00:00
Adrian Prantl 7bec903850 ObjC debug info: Substitute the class type for methods that return
a related type (e.g., if they use the instancetype keyword).

rdar://problem/13359718

llvm-svn: 181629
2013-05-10 21:08:31 +00:00
John McCall dec348f7db Correctly emit certain implicit references to 'self' even within
a lambda.

Bug #1 is that CGF's CurFuncDecl was "stuck" at lambda invocation
functions.  Fix that by generally improving getNonClosureContext
to look through lambdas and captured statements but only report
code contexts, which is generally what's wanted.  Audit uses of
CurFuncDecl and getNonClosureAncestor for correctness.

Bug #2 is that lambdas weren't specially mapping 'self' when inside
an ObjC method.  Fix that by removing the requirement for that
and using the normal EmitDeclRefLValue path in LoadObjCSelf.

rdar://13800041

llvm-svn: 181000
2013-05-03 07:33:41 +00:00
Adrian Prantl 3be10542af Ensure that the line table for functions with cleanups is sequential.
If there is cleanup code, the cleanup code gets the debug location of
the closing '}'. The subsequent ret IR-instruction does not get a
debug location. The return _expression_ will get the debug location
of the return statement.

If the function contains only a single, simple return statement,
the cleanup code may become the first breakpoint in the function.
In this case we set the debug location for the cleanup code
to the location of the return statement.

rdar://problem/13442648

llvm-svn: 180932
2013-05-02 17:30:20 +00:00
Adrian Prantl 8ac6170341 Remove an empty line so the line numbers match up again after the recent documentation change.
llvm-svn: 179898
2013-04-19 21:59:40 +00:00
Adrian Prantl c0dd7a4f25 still not relaxed enough.
llvm-svn: 179897
2013-04-19 21:52:06 +00:00
Adrian Prantl b37427fd82 cleanup and relax test cases
llvm-svn: 179896
2013-04-19 21:48:07 +00:00
Adrian Prantl c60dc718c0 Emit the underlying type in the debug info for all kinds of fixed enums
instead of only C++11-scoped-with-class-tag enums.

rdar://problem/13463793

llvm-svn: 179879
2013-04-19 19:56:39 +00:00
John McCall b7ff6db3b1 objc_autoreleasePoolPop() can throw if a -dealloc does.
Model it as throwing so that the exception can be caught.

This is generally not expected to have significant code-size
impact because the contents of the @autoreleasepool block
are very likely to contain a call, very likely at the same
cleanup level as the @autoreleasepool itself.

rdar://13660038

llvm-svn: 179630
2013-04-16 21:29:40 +00:00
Fariborz Jahanian d17c3dc60f Trying fixing test to make buildbot happy again.
llvm-svn: 179629
2013-04-16 21:19:17 +00:00
Fariborz Jahanian f177c035b7 modify test to try to make buildbot happy.
llvm-svn: 179606
2013-04-16 17:18:37 +00:00
Fariborz Jahanian d1b6778e69 Objective-C IRGen. Use llvm::WeakVH
for caching couple of global symbols used
for generation of CF/NS string meta-data
so they are not released prematuely in certain
corner cases. // rdar:// 13598026.
Reviewed by John M.

llvm-svn: 179599
2013-04-16 15:25:39 +00:00
Reid Kleckner 37e8fe13e0 FileCheck-ify more grep tests with quoted double quotes
This required some tedious reordering to match clang's order.
Presumably these ObjC tests were generated based on llvm-gcc's output
ordering.

llvm-svn: 179282
2013-04-11 13:24:56 +00:00
Reid Kleckner e494399203 FileCheck-ify some clang grep tests that use double quotes
The escaping interaction between Python and grep doesn't work on my
system.  This change fixes the tests for me.

llvm-svn: 179214
2013-04-10 21:10:39 +00:00
John McCall 4d14a90ac6 Don't copy just to capture a strong block pointer under ARC.
It turns out that the optimizer can't eliminate this without extra
information, for which there's a separate bug.

rdar://13588325

llvm-svn: 179069
2013-04-08 23:27:49 +00:00
John McCall e48f389ce6 Be sure to check ARC conventions on the implicit method declarations
of a property just in case the property's getter happens to be +1.
We won't synthesize a getter for such a property, but we will allow
the user to define a +1 method for it.
rdar://13115896

llvm-svn: 178731
2013-04-04 01:38:37 +00:00
John McCall 770a4c1a37 Protect the values of array and dictionary literals from the
ARC optimizer while they're held in local unsafe buffers.

Based on a patch by Jesse Rusak!

rdar://13573224

llvm-svn: 178721
2013-04-04 00:20:38 +00:00
John McCall 638d4f5d11 In ObjC++ on legacy runtimes, push an EH cleanup as well as
a normal cleanup when entering a @try or @synchronized to
ensure that we clean that up if an exception is triggered.

Apparently GCC did this, so it's hard to argue that we shouldn't
do at least as much.

rdar://12364847

llvm-svn: 178599
2013-04-03 00:56:07 +00:00
Adrian Prantl 6aebbb325b generalize testcase
llvm-svn: 178383
2013-03-29 23:15:55 +00:00
Adrian Prantl 0f6df00e4d Bugfix/Followup for r177086.
* Store the .block_descriptor (instead of self) in the alloca so we
  can guarantee that all captured variables are available at -O0.
* Add the missing OpDeref for the alloca.
rdar://problem/12767564

llvm-svn: 178361
2013-03-29 19:20:35 +00:00
Nadav Rotem 1da30944a6 Make clang to mark static stack allocations with lifetime markers to enable a more aggressive stack coloring.
Patch by John McCall with help by Shuxin Yang.
rdar://13115369

llvm-svn: 177819
2013-03-23 06:43:35 +00:00
John McCall eff1884274 Under ARC, when we're passing the address of a strong variable
to an out-parameter using the indirect-writeback conversion,
and we copied the current value of the variable to the temporary,
make sure that we register an intrinsic use of that value with
the optimizer so that the value won't get released until we have
a chance to retain it.

rdar://13195034

llvm-svn: 177813
2013-03-23 02:35:54 +00:00
David Blaikie 8ad22a37af Generalize debug info tests to be forward compatible with future DISubprogram changes
llvm-svn: 177659
2013-03-21 20:20:15 +00:00
David Blaikie 86eac722f9 Simplify/generalize some debug info test cases
Mostly, try to depend on the annotation comments more so these tests are more
legible, brief, and agnostic to schema changes in the future (sure, they're not
agnostic to changes to the comment annotations but since they're easier to read
they should be easier to update if that happens).

llvm-svn: 177457
2013-03-19 23:10:14 +00:00
John McCall 5ec7e7def3 Add a clarifying note when a return statement is rejected because
we expect a related result type.

rdar://12493140

llvm-svn: 177378
2013-03-19 07:04:25 +00:00
David Blaikie aadd944850 Generalize a few debug info test cases
Checking for the annotation comment rather than the metadata values makes these
tests resilient to a coming refactor that will pull these fields out into a
separate metadata node.

llvm-svn: 177237
2013-03-17 20:29:22 +00:00
Adrian Prantl 5cdc1937cc Add a testcase for r177118.
llvm-svn: 177124
2013-03-14 22:49:05 +00:00
Adrian Prantl 51936dd0bc Allocate stack storage for .block_descriptor and captured self at -O0.
This way the register allocator will not optimize away the debug info
for captured variables.

Fixes rdar://problem/12767564

llvm-svn: 177086
2013-03-14 17:53:33 +00:00
John McCall cdda29c968 Tighten up the rules for precise lifetime and document
the requirements on the ARC optimizer.

rdar://13407451

llvm-svn: 176924
2013-03-13 03:10:54 +00:00
Adrian Prantl 73409ce90f Improve the caching of debuginfo Objective C interface types.
Generate forward declarations that are RAUW'd by finalize().
We thus avoid outputting the same type several times in multiple
stages of completion.

llvm-svn: 176820
2013-03-11 18:33:46 +00:00
Adrian Prantl a03a85a425 Ensure that DIType is regenerated after we visit an implementation
that adds ivars to an interface.

Fixes rdar://13175234

This is an update to r176116 that performs a smart caching of interfaces.

llvm-svn: 176584
2013-03-06 22:03:30 +00:00
Bill Wendling 706469b453 Add more of the command line options as attribute flags.
These can be easily queried by the back-end.

llvm-svn: 176304
2013-02-28 22:49:57 +00:00
John McCall 882987f30c Use the actual ABI-determined C calling convention for runtime
calls and declarations.

LLVM has a default CC determined by the target triple.  This is
not always the actual default CC for the ABI we've been asked to
target, and so we sometimes find ourselves annotating all user
functions with an explicit calling convention.  Since these
calling conventions usually agree for the simple set of argument
types passed to most runtime functions, using the LLVM-default CC
in principle has no effect.  However, the LLVM optimizer goes
into histrionics if it sees this kind of formal CC mismatch,
since it has no concept of CC compatibility.  Therefore, if this
module happens to define the "runtime" function, or got LTO'ed
with such a definition, we can miscompile;  so it's quite
important to get this right.

Defining runtime functions locally is quite common in embedded
applications.

llvm-svn: 176286
2013-02-28 19:01:20 +00:00
Adrian Prantl 68a5750d5d Temporarily revert r176116 for compile-time performance regression.
This reverts commit ea95e4587fd13606fbf63b10a07a7d02026aa39c.

llvm-svn: 176151
2013-02-27 01:31:55 +00:00
Bill Wendling 2386bb130c Reapply r176133 with testcase fixes.
llvm-svn: 176145
2013-02-27 00:06:04 +00:00
Adrian Prantl 71510db7bc Ensure that DIType is regenerated after we visited an implementation that adds ivars to an interface. Fixes rdar://13175234
llvm-svn: 176116
2013-02-26 20:01:46 +00:00
Anna Zaks 0f424b029b Revert "Add more attributes from the command line to functions."
This reverts commit 176009.

The commit is a likely cause of several buildbot failures.

llvm-svn: 176044
2013-02-25 19:51:03 +00:00
Bill Wendling 87869db5f5 Add more attributes from the command line to functions.
This is an ongoing process. Any command line option which a back-end cares about
should be added here.

llvm-svn: 176009
2013-02-25 07:15:16 +00:00
Bill Wendling 19457e282e Update tests so that we don't test for function-only attributes on call sites.
llvm-svn: 175921
2013-02-22 21:12:51 +00:00
Bill Wendling e1c4a1babd Update to use references to attribute groups instead of listing the attributes on the call/invoke instructions.
llvm-svn: 175878
2013-02-22 09:10:20 +00:00
Fariborz Jahanian 65f1fa1bb2 Patch for debug info of qualified-id types is 'id'
By Adrian Pranti.

llvm-svn: 175793
2013-02-21 20:42:11 +00:00
Fariborz Jahanian 134cec62ab objective-C arc IR-gen. Retaining of strong
arguments in function prologue is done
with objc_StoreStrong to pair it with
similar objc_StoreStrong for release in function
epilogue. This is done with -O0 only.
// rdar://13145317

llvm-svn: 175698
2013-02-21 00:40:10 +00:00
Bill Wendling c33fc4c004 Modify the tests to use attribute group references instead of listing the
function attributes.

llvm-svn: 175606
2013-02-20 07:22:19 +00:00
John McCall a496098bb8 Use the actual class visibility for the ObjC EHTYPE global,
not the global visibility mode.

Noticed by inspection.

llvm-svn: 175479
2013-02-19 01:57:29 +00:00
Douglas Gregor 1c15cd6aaa CodeGenFunction::CurFuncDecl can be NULL; fix crash introduced in r175386.
llvm-svn: 175448
2013-02-18 15:59:24 +00:00
David Blaikie 176e72bd48 Update test cases to account for DIBuilder type changes.
Paired commit with LLVM, may produce temporary build breakage.

llvm-svn: 175427
2013-02-18 07:27:35 +00:00
Dmitri Gribenko dfe49e8c31 Test ivar-invariant.m: use a more idiomatic RUN line and tighten the test
by matching the function name first

llvm-svn: 175395
2013-02-17 14:59:41 +00:00
Saleem Abdulrasool 7a786f8c7a [clang] fix test execution command
Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
llvm-svn: 175387
2013-02-17 04:13:35 +00:00
Saleem Abdulrasool 5f25bc30d1 [CodeGen] tighten objc ivar invariant.load attribution
An ivar ofset cannot be marked as invariant load in all cases.  The ivar offset
is a lazily initialised constant, which is dependent on an objc_msgSend
invocation to perform a fixup of the offset.  If the load is being performed on
a method implemented by the class then this load can safely be marked as an
inviarant because a message must have been passed to the class at some point,
forcing the ivar offset to be resolved.

An additional heuristic that can be used to identify an invariant load would be
if the ivar offset base is a parameter to an objc method.  However, without the
parameters available at hand, this is currently not possible.

Reviewed-by: John McCall <rjmccall@apple.com>
Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
llvm-svn: 175386
2013-02-17 04:03:34 +00:00