Commit Graph

57645 Commits

Author SHA1 Message Date
Fariborz Jahanian a4f6b6b180 Minor refactoring of my last patch.
llvm-svn: 68870
2009-04-11 18:54:57 +00:00
Chris Lattner 7e0fe4458c sink abstract typedefs like Action::ExprTy from the Action class
down to the ActionBase class.  This eliminates dependencies of (e.g.)
DeclSpec.h on Action.h, meaning that action.h can now include these
headers and use their types directly in the actions interfaces.

This is a refactoring to support a future change, no functionality
change.

llvm-svn: 68869
2009-04-11 18:48:18 +00:00
Chris Lattner 225dd6c830 add some #includes for better compatibility with gcc 4.4,
thanks to Tobias Stadler for pointing this out.

llvm-svn: 68868
2009-04-11 18:40:46 +00:00
Chris Lattner 4f472a325a rename Parser::ParseObjCSelector -> Parser::ParseObjCSelectorPiece,
since it only parses one identifier out of the selector, not the 
whole thing.

llvm-svn: 68867
2009-04-11 18:13:45 +00:00
Chris Lattner a9d0ffe57e simplify this code to not bother stripping to canonical types, and
indent code properly

llvm-svn: 68866
2009-04-11 18:01:59 +00:00
Fariborz Jahanian aae4349df9 Fixes a ir-gen crash for K&R style blocks.
llvm-svn: 68865
2009-04-11 17:55:15 +00:00
Chris Lattner 9edfeed6b8 add radar number
llvm-svn: 68864
2009-04-11 17:26:58 +00:00
Dan Gohman 825236b116 Revert r68847. It breaks the build on non-Darwin targets, with this message
from the assembler:

Error: unknown pseudo-op: `.debug_inlined'
llvm-svn: 68863
2009-04-11 15:57:04 +00:00
Ted Kremenek be4fe9e239 Update analyzer build.
llvm-svn: 68860
2009-04-11 04:57:08 +00:00
Ted Kremenek 52ca69ebf3 analyzer: We cannot bind values to CodeTextRegions.
llvm-svn: 68857
2009-04-11 02:32:27 +00:00
Daniel Dunbar 343f4ba18f Tweak wording, input argument isn't necessarily a "file", things like
-lstdc++ are inputs too.

llvm-svn: 68854
2009-04-11 02:06:32 +00:00
Anders Carlsson d8281f1589 Don't mangle variables that are at translation unit scope.
llvm-svn: 68853
2009-04-11 01:19:45 +00:00
Anders Carlsson d8e39bbb84 Add support for generating reference initialization code.
llvm-svn: 68852
2009-04-11 01:08:03 +00:00
Ted Kremenek 4531be138c Add analyzer support for objc_atomicCompareAndSwap()
llvm-svn: 68849
2009-04-11 00:54:13 +00:00
Devang Patel 790e60999e Keep track of inlined functions and their locations. This information is collected when nested llvm.dbg.func.start intrinsics are seen. (Right now, inliner removes nested llvm.dbg.func.start intrinisics during inlining.)
Create debug_inlined dwarf section using these information. This info is used by gdb, at least on Darwin, to enable better experience debugging inlined functions. See DwarfWriter.cpp for more information on structure of debug_inlined section.

llvm-svn: 68847
2009-04-11 00:16:47 +00:00
Douglas Gregor 3ed42cb0b3 Store unique IDs for identifiers in the PCH file. Use some bitmangling
so that we only need to perform the lookup and identifier resolution
once per identifier in the PCH file.

llvm-svn: 68846
2009-04-11 00:14:32 +00:00
Ted Kremenek df24000d24 Implement analyzer support for OSCompareAndSwap. This required pushing "tagged"
ProgramPoints all the way through to GRCoreEngine.

NSString.m now fails with RegionStoreManager because of the void** cast.
Disabling use of region store for that test for now.

llvm-svn: 68845
2009-04-11 00:11:10 +00:00
Fariborz Jahanian d381cde486 Non-pointer objects are none gc'able regardles of
the attribute set on them.

llvm-svn: 68844
2009-04-11 00:00:54 +00:00
Chris Lattner 4d59f88e60 move a target-specific test into its directory so it isn't run if you
don't configure the ARM target in.

llvm-svn: 68843
2009-04-10 23:58:38 +00:00
Douglas Gregor 92863e475e Compare the predefines buffer in the PCH file with the predefines
buffer generated for the current translation unit. If they are
different, complain and then ignore the PCH file. This effectively
checks for all compilation options that somehow would affect
preprocessor state (-D, -U, -include, the dreaded -imacros, etc.).

When we do accept the PCH file, throw away the contents of the
predefines buffer rather than parsing them, since all of the results
of that parsing are already stored in the PCH file. This eliminates
the ugliness with the redefinition of __builtin_va_list, among other
things.

llvm-svn: 68838
2009-04-10 23:10:45 +00:00
Mike Stump d352fd3699 Fixup copy/dispose helpers for Objective-C. Radar 6756504
llvm-svn: 68837
2009-04-10 23:09:55 +00:00
Daniel Dunbar 5acb3a28e2 Force driver triple.
llvm-svn: 68836
2009-04-10 22:53:25 +00:00
Anders Carlsson 7f96b360f2 Remove asserts that weren't really useful, and that would fire in case the CleanupEntries vector needed to be reallocated.
llvm-svn: 68835
2009-04-10 22:49:13 +00:00
Fariborz Jahanian 60331be08d Fix another fallout from defining __weak unconditionally.
llvm-svn: 68834
2009-04-10 22:42:54 +00:00
Daniel Dunbar 8c920c9220 Don't set both readnone and readonly.
llvm-svn: 68833
2009-04-10 22:14:52 +00:00
Chris Lattner d959d753bc do a dance with predefines, and finally enable reading of macros from
PCH.  This works now, except for limitations not being able to do things
with identifiers.  The basic example in the testcase works though.

llvm-svn: 68832
2009-04-10 22:13:17 +00:00
Fariborz Jahanian e49adaf7f2 Fixed the test.
llvm-svn: 68831
2009-04-10 22:09:52 +00:00
Chris Lattner 3c68407868 move a bunch of code for initializing the predefines buffer out of Preprocessor.cpp
into clang-cc.cpp.  This makes it so clang-cc constructs the *entire* predefines 
buffer, not just half of it.  A bonus of this is that we get to kill a copy
of DefineBuiltinMacro.

llvm-svn: 68830
2009-04-10 21:58:23 +00:00
Fariborz Jahanian 5240a49f04 Add a test case for my last patch.
llvm-svn: 68829
2009-04-10 21:43:13 +00:00
Chris Lattner 34321bcd0b add support for reading macros. This does all the reading (with a bunch of
fixme's, e.g. for tokens with identifiers) but does not actually install
them.  Some details with the predefines buffer needs to be sorted out first.

llvm-svn: 68828
2009-04-10 21:41:48 +00:00
Chris Lattner 1156565c48 make a method public
llvm-svn: 68827
2009-04-10 21:40:09 +00:00
Daniel Dunbar 670af594d8 Force triple for a number of tests that rely on __weak.
llvm-svn: 68826
2009-04-10 21:23:20 +00:00
Chris Lattner 5ec5a30901 simplify code.
llvm-svn: 68825
2009-04-10 21:17:07 +00:00
Douglas Gregor bfbde53ce1 Encode the target triple in the PCH file, and check that target triple when using the PCH file
llvm-svn: 68824
2009-04-10 21:16:55 +00:00
Ted Kremenek ef52cc6b95 Add arbitrary "tags" to ProgramPoints. While this fattens up ProgramPoint even
more, it gives us a tremendous amount of flexibility for extending the analyzer
to handle arbitrary program points.

llvm-svn: 68823
2009-04-10 21:06:25 +00:00
Daniel Dunbar b5023e90f4 Honor MACOSX_DEPLOYMENT_TARGET environment variable.
llvm-svn: 68822
2009-04-10 21:00:07 +00:00
Misha Brukman 5e8b8b37a3 Fixed spelling.
llvm-svn: 68821
2009-04-10 20:48:27 +00:00
Douglas Gregor 55abb2389d Implement serialization/deserialization of LangOptions in the PCH
file. When de-serializing LangOptions, we check that the
currently-provided language options are consistent with the options
used to compile the PCH file. If they are not, we emit a diagnostic
and ignore the PCH file.

llvm-svn: 68820
2009-04-10 20:39:37 +00:00
Fariborz Jahanian 40458ec7ef Reject compiles for x86_64 target for MacOS versions which
do not support it.

llvm-svn: 68819
2009-04-10 20:33:45 +00:00
Daniel Dunbar d272cca527 Internal variables could mistakenly have "hidden" visibility when
their emission was deferred.
 - <rdar://problem/6775234> variables with internal linkage should not
   be exposed with -fvisibility=hidden.

llvm-svn: 68818
2009-04-10 20:26:50 +00:00
Daniel Dunbar de46660cda Test case for -miphoneos-version-min, also part of Shantonu's patch!
llvm-svn: 68817
2009-04-10 20:13:51 +00:00
Daniel Dunbar c8b7af89ce Driver: Forward -miphoneos-version-min to clang.
llvm-svn: 68816
2009-04-10 20:11:50 +00:00
Daniel Dunbar 497ff13243 Support -miphoneos-version-min in clang-cc.
- Patch by Shantonu Sen (with a minor tweak to split out
   getDarwin{OSX,IPhoneOS}Defines)!

 - <rdar://problem/6776277> Need clang-cc/ccc-analyzer support for
   -miphoneos-version-min

llvm-svn: 68815
2009-04-10 19:52:24 +00:00
Daniel Dunbar e3f4197524 Support %S in Python TestRunner
llvm-svn: 68814
2009-04-10 19:49:21 +00:00
Devang Patel 61b35cd15e DebugLabelFolder ruthlessly deletes redundant labels. However, sometimes the redundant labels is referenced by debug info somewhere else. This patch provies a way so that dwarf writer can mark labels as used.
llvm-svn: 68813
2009-04-10 18:58:59 +00:00
Mike Stump 6764593098 Fixup codegen for nested blocks that use copy/dispose in the inner
blocks, so that the outer blocks use it as well.  Radar 6762279

llvm-svn: 68811
2009-04-10 18:52:28 +00:00
Bob Wilson f074ca7454 Clean up a bunch of whitespace issues and fix a comment typo.
No functional changes.

llvm-svn: 68808
2009-04-10 18:48:47 +00:00
Bill Wendling e8b48b49c9 Don't install the libLLVMHello.dylib example.
llvm-svn: 68807
2009-04-10 18:48:38 +00:00
Fariborz Jahanian 464423dce4 Patch to generate meta-data for prtocol used
in @protocol expression.

llvm-svn: 68806
2009-04-10 18:47:34 +00:00
Daniel Dunbar 8b723e299c Driver: CCC_ADD_ARGS could end up using dangling pointers.
llvm-svn: 68805
2009-04-10 18:32:59 +00:00