Commit Graph

39036 Commits

Author SHA1 Message Date
Gordon Henriksen eb4ce98f98 Using modules to group enumerations in Ocaml bindings.
llvm-svn: 45229
2007-12-19 22:54:12 +00:00
Ted Kremenek 230bd918b2 Interned MainFileID within SourceManager. Since SourceManager is referenced by
both Preprocessor and ASTContext, we no longer need to explicitly pass
MainFileID around in function calls that also pass either Preprocessor or
ASTContext. This resulted in some nice cleanups in the ASTConsumers and the
driver.

llvm-svn: 45228
2007-12-19 22:51:13 +00:00
Ted Kremenek f7bfae6b45 Typo fix.
llvm-svn: 45227
2007-12-19 22:32:34 +00:00
Gordon Henriksen 34eb6d877e Adding bindings for memory buffers and module providers. Switching
to exceptions rather than variants for error handling in Ocaml.

llvm-svn: 45226
2007-12-19 22:30:40 +00:00
Ted Kremenek 9a53275918 Added storage of the FileID of the the main source file of a translation unit
in SourceManager.

llvm-svn: 45225
2007-12-19 22:29:55 +00:00
Steve Naroff fa5751f842 Various tweaks to the get/lookup instance/class method API's.
llvm-svn: 45224
2007-12-19 22:27:04 +00:00
Ted Kremenek 6c7807716b Removed "SourceFile" from TranslationUnit. This same information will (soon)
be available by querying the SourceManager within the ASTContext referenced by
the TranslationUnit.

llvm-svn: 45223
2007-12-19 22:24:34 +00:00
Chris Lattner 7bd082e188 Describe Nico's script for gcc interception. Patch by Nico Weber.
llvm-svn: 45222
2007-12-19 22:17:19 +00:00
Dale Johannesen eadbf4b91c Enable EH on PPC Darwin. This basically works; there
are a couple of issues that show up with the optimizer,
but I don't think they're really EH problems.
(llvm-gcc testsuite users note:  By default the testsuite
uses the unwinding code that's built as part of your local
llvm-gcc, which does not work.  You need to trick it into
using the installed system unwinding code to get useful
results.)

llvm-svn: 45221
2007-12-19 21:54:36 +00:00
Scott Michel 5ecac82f71 CellSPU testcase, extract_elt.ll: extract vector element.
llvm-svn: 45219
2007-12-19 21:17:42 +00:00
Duncan Sands aa31b92508 When inlining through an 'nounwind' call, mark inlined
calls 'nounwind'.  It is important for correct C++
exception handling that nounwind markings do not get
lost, so this transformation is actually needed for
correctness.

llvm-svn: 45218
2007-12-19 21:13:37 +00:00
Scott Michel a246e09aa0 More working CellSPU test cases:
- call.ll: Function call
- ctpop.ll: Count population
- dp_farith.ll: DP arithmetic
- eqv.ll: Equivalence primitives
- fcmp.ll: SP comparisons
- fdiv.ll: SP division
- fneg-fabs.ll: SP negation, aboslute value
- int2fp.ll: Integer -> SP conversion
- rotate_ops.ll: Rotation primitives
- select_bits.ll: (a & c) | (b & ~c) bit selection
- shift_ops.ll: Shift primitives
- sp_farith.ll: SP arithmentic

llvm-svn: 45217
2007-12-19 20:50:49 +00:00
Scott Michel 098c113bc8 Two more test cases: or_ops.ll (arithmetic or operations) and vecinsert.ll
(vector insertions)

llvm-svn: 45216
2007-12-19 20:15:47 +00:00
Ted Kremenek aff2343af3 Cleaned up "-o" option to print "-o=<path>" instead of "-o=<string>" when
doing clang --help.

llvm-svn: 45215
2007-12-19 19:50:41 +00:00
Chris Lattner f1be288617 fix formatting
llvm-svn: 45214
2007-12-19 19:48:49 +00:00
Ted Kremenek 6c0b224011 Added "-o" option to driver. ASTConsumers will need to be gradually
rewired to utilize this option.

Renamed option --serialize-ast --serialize.

llvm-svn: 45213
2007-12-19 19:47:59 +00:00
Chris Lattner c238331377 Add support for #pragma mark, which shouldn't warn about bogus tokens.
llvm-svn: 45212
2007-12-19 19:38:36 +00:00
Ted Kremenek 0061aeb316 Removed storing inode and device number in TranslationUnit.
Added "SourceFile" string to TranslationUnit to record corresponding
source file.

Updated serialization of TranslationUnits and logic in the driver to
correctly pass the source file information to the serializer.

llvm-svn: 45211
2007-12-19 19:27:38 +00:00
Chris Lattner 6a4f74593c fix some crazy indentation
llvm-svn: 45210
2007-12-19 19:23:28 +00:00
Steve Naroff 7e718bb3fd Soften the macro rewrite error to a warning (and change the text).
llvm-svn: 45209
2007-12-19 19:16:49 +00:00
Fariborz Jahanian 6a128ae962 Minor test twik.
llvm-svn: 45208
2007-12-19 19:07:24 +00:00
Ted Kremenek 0ec9a20bf0 Updated locations of TranslationUnit.[cpp,h] in XCode project.
Added AST/ASTConsumer.cpp to XCode project.

llvm-svn: 45206
2007-12-19 18:07:54 +00:00
Chris Lattner 2a70c95387 reenable this code, fix the testcase.
llvm-svn: 45205
2007-12-19 18:01:43 +00:00
Chris Lattner 99488aec20 disable my commit from yesterday, fixing a regression test failure.
llvm-svn: 45204
2007-12-19 17:49:45 +00:00
Fariborz Jahanian a1e3420c49 This patch concludes implementation of dynamic objective-c type qualified by
protocol list.

llvm-svn: 45203
2007-12-19 17:45:58 +00:00
Anders Carlsson 2c26cc232f Fix the embarassing typo for real this time (- vs _), sorry about breaking the tests Steve.
llvm-svn: 45202
2007-12-19 17:43:24 +00:00
Ted Kremenek 6c3777c319 Moved generation of the name of the serialized AST file into
CreateASTSerializer.

llvm-svn: 45201
2007-12-19 17:25:59 +00:00
Steve Naroff 55cb4be8ae Emit errors when attempting to rewrite ObjC expressions that originate from a macro expansion.
We plan on fixing this and removing this restriction after the break...

llvm-svn: 45200
2007-12-19 14:32:56 +00:00
Steve Naroff 735a2716de Revert Anders r45191 commit...it broke several of the tests.
llvm-svn: 45199
2007-12-19 14:11:27 +00:00
Duncan Sands e9d8861cdf Simplify LowerCallTo by using a callsite.
llvm-svn: 45198
2007-12-19 09:48:52 +00:00
Duncan Sands 030bce7b83 The C++ exception handling personality function wants
to know about calls that cannot throw ('nounwind'):
if such a call does throw for some reason then the
personality will terminate the program.  The distinction
between an ordinary call and a nounwind call is that
an ordinary call gets an entry in the exception table
but a nounwind call does not.  This patch sets up the
exception table appropriately.  One oddity is that
I've chosen to bracket nounwind calls with labels (like
invokes) - the other choice would have been to bracket
ordinary calls with labels.  While bracketing
ordinary calls is more natural (because bracketing
by labels would then correspond exactly to getting an
entry in the exception table), I didn't do it because
introducing labels impedes some optimizations and I'm
guessing that ordinary calls occur more often than
nounwind calls.  This fixes the gcc filter2 eh test,
at least at -O0 (the inliner needs some tweaking at
higher optimization levels).

llvm-svn: 45197
2007-12-19 07:36:31 +00:00
Scott Michel 9b834469e0 Add new immed16.ll test case, fix CellSPU errata to make test case work.
llvm-svn: 45196
2007-12-19 07:35:06 +00:00
Anders Carlsson 721f601507 Fix an embarassing typo and add some very limited support for the aligned attribute.
llvm-svn: 45195
2007-12-19 07:19:40 +00:00
Christopher Lamb e592175f80 svn:ignore configure.out at the root level
llvm-svn: 45194
2007-12-19 06:43:23 +00:00
Christopher Lamb 6af61fab70 Change svn attributes to ignore build directories.
llvm-svn: 45193
2007-12-19 06:41:17 +00:00
Bill Wendling b528a10e0a Modified to support comments better.
llvm-svn: 45192
2007-12-19 06:20:05 +00:00
Anders Carlsson 081f1b411d Normalize attribute names if possible so we won't have to do two strcmps for every attribute.
llvm-svn: 45191
2007-12-19 06:16:30 +00:00
Bill Wendling ca77ecb40a Mark the "isRemat" instruction as never having side effects.
llvm-svn: 45190
2007-12-19 06:07:48 +00:00
Chris Lattner 0f8a39c793 fix broken assert.
llvm-svn: 45189
2007-12-19 05:38:06 +00:00
Chris Lattner ea72f449fe Implement C99 6.7.5.3p1
llvm-svn: 45188
2007-12-19 05:31:29 +00:00
Chris Lattner 747359f973 fix more table abuses.
llvm-svn: 45187
2007-12-19 05:04:11 +00:00
Evan Cheng 9f06e5e2df Don't leave newly created nodes around if it turns out they are not needed.
llvm-svn: 45186
2007-12-19 01:34:38 +00:00
Ted Kremenek f4c38c9289 Refactored inode and device number into FileEntry, and changed the
ADT storing FileEntry's in FileManager from a map to a set.

llvm-svn: 45184
2007-12-18 22:29:39 +00:00
Ted Kremenek 8c8947fb92 When serializing SourceManager, we now serialize out absolute paths
to serialized source files.

llvm-svn: 45183
2007-12-18 22:12:19 +00:00
Ted Kremenek 14020706d8 Added "GetCurrentDirectory()" to sys::Path.
llvm-svn: 45182
2007-12-18 22:07:33 +00:00
Ted Kremenek f70d24d2ae Moved ReadBitcodeFile and EmitBitcodeFile out of TranslationUnit and made them
the standalone functions ReadASTBitcodeFile and EmitASTBitcodeFile
respectively.

llvm-svn: 45180
2007-12-18 21:44:50 +00:00
Steve Naroff 824a9d8d4b Fix serious regression with ObjcInterfaceDecl. Now that we are storing -1 to mean undefined, we need to change the respective getters from unsigned->int.
llvm-svn: 45179
2007-12-18 21:41:31 +00:00
Bill Wendling 166f746246 Add debugging info. Use the newly created "hasUnmodelledSideEffects" method.
llvm-svn: 45178
2007-12-18 21:38:04 +00:00
Ted Kremenek 25dbd71a4c Fixed broken includes introduced by recent (incomplete) patch to
TranslationUnit.

llvm-svn: 45177
2007-12-18 21:36:21 +00:00
Ted Kremenek afb98f9c09 Moved TranslationUnit.h to include path.
llvm-svn: 45176
2007-12-18 21:34:50 +00:00