Commit Graph

13871 Commits

Author SHA1 Message Date
Fariborz Jahanian 9ea5839cb6 Objective-c++ IR gen.
Flag synthesized struct decl. as non-empty so
CXX side of ir gen does not skip its Null initialization.
Fixes radar 8027844 for objc++'s collection statement.

llvm-svn: 104837
2010-05-27 16:05:06 +00:00
Douglas Gregor 205a361413 When we've parsed a nested-name-specifier in a member access
expression, "forget" about the object type; only the
nested-name-specifier matters for name lookup purposes. Fixes PR7239.

llvm-svn: 104834
2010-05-27 15:25:59 +00:00
Daniel Dunbar 3eeeccd6e2 Darwin/ARM seems to support mac68k align as well.
llvm-svn: 104828
2010-05-27 07:00:26 +00:00
Daniel Dunbar 9296f63ff0 Driver: Update -O -> -O2 replacement for addition of -O0 option.
llvm-svn: 104823
2010-05-27 06:51:08 +00:00
John McCall bf8c519a0d Require a complete type when performing the qualified lookup during
instantiation of a dependent elaborated type specifier.  Fixes PR 7199.

llvm-svn: 104822
2010-05-27 06:40:31 +00:00
John McCall 943fae95f5 Implement __builtin_init_dwarf_reg_size_table and __builtin_dwarf_sp_column
for 32-bit MIPS processors.  Hat-tip to rdivacky for providing gcc dumps
on this.

llvm-svn: 104816
2010-05-27 06:19:26 +00:00
Daniel Dunbar 06e2cc3f86 Driver: Add support for -m[no-]relax-all, and make it the default at -O0.
llvm-svn: 104815
2010-05-27 06:18:05 +00:00
Daniel Dunbar 6da1098b4b Sema: Add initial support for '#pragma options align=mac68k'.
- Docs are fairly sketchy, if someone wants to pore through gcc to look for
   holes I'd appreciate any failing test cases!

llvm-svn: 104809
2010-05-27 05:45:51 +00:00
Anders Carlsson 439edd1aea More work on the new empty subobject map.
llvm-svn: 104808
2010-05-27 05:41:06 +00:00
Daniel Dunbar c43b6b20d5 Driver: Add clang -cc1 -mrelax-all option, which sets relaxes all instructions when using -integrated-as.
llvm-svn: 104807
2010-05-27 05:39:39 +00:00
Daniel Dunbar 592a85c137 Strip trailing whitespace.
llvm-svn: 104801
2010-05-27 02:25:46 +00:00
Daniel Dunbar fc6507ef58 AST: Add AlignMac68kAttr, not yet used.
llvm-svn: 104800
2010-05-27 02:25:39 +00:00
Daniel Dunbar 4dbe15d437 Sema: Factor out struct for alignment stack entries.
llvm-svn: 104799
2010-05-27 02:25:27 +00:00
Daniel Dunbar 8804f2e253 Sema: Replace getPragmaPackAlignment with AddAlignmentAttributesForRecord, which
exposes less details.

llvm-svn: 104797
2010-05-27 01:53:40 +00:00
John McCall c2af939ab4 When deciding whether a deferred declaration has already been emitted,
aliases count as definitions regardless of whether their target has been
emitted yet.  Fixes PR 7142.

llvm-svn: 104796
2010-05-27 01:45:30 +00:00
Daniel Dunbar 401304462a AST: Rename PragmaPackAttr to MaxFieldAlignmentAttr, which is more accurate.
llvm-svn: 104795
2010-05-27 01:12:46 +00:00
Daniel Dunbar bd60652ace Sema: Reject '#pragma options align=mac68k' everywhere except i386-apple-darwin.
llvm-svn: 104789
2010-05-27 00:35:16 +00:00
Ted Kremenek 15a0abd399 Discard qualifiers for ElementRegions so that a 'const' doesn't change the lookup semantics
in the symbol store.  We may wish to push this down into the StoreManager itself.

llvm-svn: 104788
2010-05-27 00:29:00 +00:00
Anders Carlsson c121b4e59f More work on the empty subobjects map.
llvm-svn: 104787
2010-05-27 00:07:01 +00:00
Daniel Dunbar 69dac58e7d Sema: Support for #pragma options align={reset,natural}. '#pragma options align'
shares the stack with '#pragma pack', who knew!?

llvm-svn: 104786
2010-05-27 00:04:40 +00:00
Daniel Dunbar 75c9be7e80 Parse: Add support for '#pragma options align'.
Also, fix a source location bug with the rparen in #pragma pack.

llvm-svn: 104784
2010-05-26 23:29:06 +00:00
John McCall 23f6626262 Correctly pass aggregates by reference when emitting thunks.
llvm-svn: 104778
2010-05-26 22:34:26 +00:00
Douglas Gregor a2db793ff0 Introduce priorities into the code-completion results.
llvm-svn: 104751
2010-05-26 22:00:08 +00:00
Fariborz Jahanian 5f81b9f3f6 Patch to fix a irgen crash accessing an initialized local static
variable in a local function. Fixes pr7101.

llvm-svn: 104743
2010-05-26 21:45:50 +00:00
Ted Kremenek 34ddec630c Predefine the '__clang_analyzer__' macro when using '-analyze'.
llvm-svn: 104742
2010-05-26 21:36:54 +00:00
Fariborz Jahanian b0e28471a6 Improve on flexible array diagnostics (PR7029).
llvm-svn: 104739
2010-05-26 20:46:24 +00:00
Fariborz Jahanian 1138ba6693 Fixes misc. flexible array bugs in c++ (PR7029).
llvm-svn: 104733
2010-05-26 20:19:07 +00:00
Charles Davis c9e78145b0 Extract the ObjC and blocks manglers into their own class. No functionality
change.

llvm-svn: 104715
2010-05-26 18:25:27 +00:00
Abramo Bagnara 341d783488 Added source order to CXXBaseOrMemberInitializer.
llvm-svn: 104712
2010-05-26 18:09:23 +00:00
Anders Carlsson c5ca1f7799 Move ComputeEmptySubobjectSizes to EmptySubobjectMap.
llvm-svn: 104702
2010-05-26 15:54:25 +00:00
Anders Carlsson f58de11b61 Stub out the EmptySubobjectsMap class.
llvm-svn: 104701
2010-05-26 15:32:58 +00:00
Anders Carlsson ce7f77729a Inline the RecordLayoutBuilder constructor.
llvm-svn: 104700
2010-05-26 15:20:08 +00:00
Anders Carlsson c28a6c9251 Add a Layout overload that takes a CXXRecordDecl.
llvm-svn: 104695
2010-05-26 15:10:00 +00:00
Benjamin Kramer c7656cdf83 Move RecordLayoutBuilder into an anonymous namespace.
llvm-svn: 104693
2010-05-26 09:58:31 +00:00
Douglas Gregor 1b30b3c9fa When transforming a C++ "new" expression's constructor arguments, drop
any arguments that are default-argument expressions. The can show up
when we have a new expression whose constructor arguments are not
type-dependent and whose allocated type is not dependent and has a
constructor with default arguments. Fixes PR7202.

llvm-svn: 104690
2010-05-26 07:10:06 +00:00
Anders Carlsson c222620adf Rename ASTRecordLayoutBuilder to RecordLayoutBuilder.
llvm-svn: 104688
2010-05-26 05:58:59 +00:00
Anders Carlsson b47c482cf0 Remove RecordLayoutBuilder.h
llvm-svn: 104687
2010-05-26 05:49:19 +00:00
Anders Carlsson 35a36eb78d Move the ASTRecordLayoutBuilder class declaration into the .cpp file.
llvm-svn: 104686
2010-05-26 05:41:04 +00:00
Douglas Gregor 9af03022ff Tell the string literal parser when it's not permitted to emit
diagnostics. That would be while we're parsing string literals for the
sole purpose of producing a diagnostic about them. Fixes
<rdar://problem/8026030>.

llvm-svn: 104684
2010-05-26 05:35:51 +00:00
Anders Carlsson b48414f4cb Fix thinko and remove another unused function.
llvm-svn: 104683
2010-05-26 05:31:23 +00:00
Anders Carlsson 1d1e4cf04d Fix build.
llvm-svn: 104682
2010-05-26 05:25:15 +00:00
Anders Carlsson d20e7cd3c6 No need to use the PrimaryBaseInfo struct in the builder.
llvm-svn: 104681
2010-05-26 05:20:58 +00:00
Douglas Gregor 0094eb26fc Be sure to use the standard substitutions when mangling the names of
vtables, VTTs, and construction vtables. Fixes PR7201.

llvm-svn: 104675
2010-05-26 05:11:13 +00:00
Anders Carlsson 87209bb54b Remove FIXME.
llvm-svn: 104674
2010-05-26 05:11:02 +00:00
Anders Carlsson d295486012 Fold the other Layout overload into its sole call site.
llvm-svn: 104673
2010-05-26 05:10:47 +00:00
Anders Carlsson 6ed3a9a494 Fold the ASTRecordLayoutBuilder::ComputeLayout overload that takes an ObjCInterfaceDecl pointer into its only callsite.
llvm-svn: 104672
2010-05-26 05:04:25 +00:00
Anders Carlsson df291d8d8b Move the relevant ASTContext member functions that deal with ASTRecordLayoutBuilder into RecordLayoutBuilder.cpp. This matches the way we interact with other builder classes (CGRecordLayoutBuilder, VTableBuilder and VTTBuilder) and it also allows for making ASTRecordLayoutBuilder a private class without a header file.
llvm-svn: 104671
2010-05-26 04:56:53 +00:00
Zhongxing Xu eb4fc4a64c Small fix.
llvm-svn: 104669
2010-05-26 03:36:08 +00:00
Zhongxing Xu d4f1294f1e Remove extents of dead symbolic regions when RemoveDeadBindings.
This requires creating new persistent states due to the nature of GDM.

llvm-svn: 104668
2010-05-26 03:27:35 +00:00
Douglas Gregor f64acca2f5 Only enable code patterns (e.g., try { statements } catch (...) {
statements }) in the code-completion results if explicitly requested.

llvm-svn: 104637
2010-05-25 21:41:55 +00:00