Commit Graph

56458 Commits

Author SHA1 Message Date
Chris Lattner a1321f1632 pass langoptions around.
llvm-svn: 67376
2009-03-20 15:55:34 +00:00
Chris Lattner 4ba73aa0c2 pass LangOptions into TargetInfo::getTargetDefines, so that targets
can have language-specific defines.

llvm-svn: 67375
2009-03-20 15:52:06 +00:00
Chris Lattner 91d63d1248 add a new LangOptions::GNUMode bit to distinguish between GNU99 and C99 etc.
llvm-svn: 67374
2009-03-20 15:44:26 +00:00
Sanjiv Gupta 4655d731e1 Fixed comment for libcalls.
llvm-svn: 67373
2009-03-20 14:10:20 +00:00
Sanjiv Gupta 83debdf4b4 Fixed build warnings for unused variables.
llvm-svn: 67372
2009-03-20 13:49:20 +00:00
Sanjiv Gupta c035b7e879 Reformatting. Inserted code comments. Cleaned interfaces.
Removed unncessary code. No functionality change.

llvm-svn: 67371
2009-03-20 13:42:20 +00:00
Sanjiv Gupta e9759c458c Fixed the comment. No functionality change.
llvm-svn: 67370
2009-03-20 09:38:50 +00:00
Nick Lewycky 18ca80cdda Revert r67334 and r37349 which break "make check" on Linux.
llvm-svn: 67368
2009-03-20 07:56:31 +00:00
Daniel Dunbar 0e75994e8b Driver: Add Arg::getAsString and use when dumping arguments to
diagnostics.
 - This ensures that the whole argument and values are printed,
   instead of just the option name.

llvm-svn: 67366
2009-03-20 06:14:23 +00:00
Chris Lattner 03b886e301 strictly evaluate SVN_REVISION so that svnversion is run once instead of 4 times.
llvm-svn: 67365
2009-03-20 05:23:53 +00:00
Chris Lattner f0db9b6321 Apply the patch requested in PR3846.
llvm-svn: 67364
2009-03-20 05:08:24 +00:00
Mon P Wang f67448adf8 Added option to enable generating less precise mad (multiply addition)
for those architectures that support the instruction.

llvm-svn: 67363
2009-03-20 05:06:58 +00:00
Daniel Dunbar d972e2247b Driver: Implement -print-search-dirs.
llvm-svn: 67362
2009-03-20 04:37:21 +00:00
Daniel Dunbar 9c92326b20 Driver: Unbreak ToolChain::get{File,Program}Paths (which should return
reference, not copy).

llvm-svn: 67361
2009-03-20 04:36:45 +00:00
Dan Gohman 76402b9a3d The last use in a block that doesn't have successors
(return or unreachable) is a kill.

llvm-svn: 67357
2009-03-20 01:28:21 +00:00
Daniel Dunbar 03e0a4f324 Driver: Sketch Darwin tool chains.
llvm-svn: 67356
2009-03-20 00:57:52 +00:00
Daniel Dunbar 64ed5e3730 Driver: Add darwin::Lipo tool.
llvm-svn: 67355
2009-03-20 00:52:38 +00:00
Ted Kremenek eb996ab37d Preserve ordering between -include and -include-pth.
llvm-svn: 67354
2009-03-20 00:40:03 +00:00
Douglas Gregor 07d8e3a500 Allow flexible array initializers that are not surrounded by
braces. We now build the appropriate fully-structured initializer list
for such things. Per PR3618, verified that we're getting the right
code generation.

llvm-svn: 67353
2009-03-20 00:32:56 +00:00
Ted Kremenek a1a0e4b27e Implement "-include-pth" in low-level driver. This allows a PTH file to be used
similar to a regular file passed to "-include". When -include-pth is used, the
low-level driver queries the PTH file for the name of the original source file
that generated the PTH file and implicitly adds a '#include' for that file in
the Predefines buffer.

llvm-svn: 67352
2009-03-20 00:26:38 +00:00
Ted Kremenek 22c3dd4c1c Add accessor Preprocessor::getPTHManager().
llvm-svn: 67351
2009-03-20 00:24:49 +00:00
Daniel Dunbar 59e5e880f3 Driver: Move tool chain implementations into ToolChains.cpp.
llvm-svn: 67350
2009-03-20 00:20:03 +00:00
Evan Cheng 6d6647c7b3 Fix typo's.
llvm-svn: 67349
2009-03-20 00:14:09 +00:00
Daniel Dunbar 1fc898c40a Driver: Temporary hack to allow -ccc-print-bindings to work (for
testing) even with -pipe on.

llvm-svn: 67348
2009-03-20 00:11:04 +00:00
Sebastian Redl 8d5baa09f8 Fix the Win32 VS2008 build:
- Make type declarations match the struct/class keyword of the definition.
 - Move AddSignalHandler into the namespace where it belongs.
 - Correctly call functions from template base.
 - Some other small changes.
With this patch, LLVM and Clang should build properly and with far less noise under VS2008.

llvm-svn: 67347
2009-03-19 23:26:52 +00:00
Sebastian Redl 90b6edda75 Bindir and Win32 builds work, so switch to .inc files. Leave the .def files in the tree for a day or so longer.
llvm-svn: 67346
2009-03-19 23:18:26 +00:00
Ted Kremenek f9ccd5cdc2 Add PTHManager::getOriginalSourceFile(), a method that returns the name of the
original source file (if any) that was used to generate the PTH cache.

llvm-svn: 67343
2009-03-19 22:19:30 +00:00
Ted Kremenek 7040b57c9f Store the name of the original file used to generate the PTH file in the PTH
file itself.

llvm-svn: 67340
2009-03-19 22:10:38 +00:00
Chris Lattner 308fdf6ee9 wording.
llvm-svn: 67337
2009-03-19 22:03:42 +00:00
Douglas Gregor 3731162ade Variables marked as "extern" can actually have internal linkage if
there is a previous declaration marked "static". This fixes PR3645.

llvm-svn: 67336
2009-03-19 22:01:50 +00:00
Evan Cheng 1361cbbb0b Added MachineInstr::isRegTiedToDefOperand to check for two-addressness.
llvm-svn: 67335
2009-03-19 20:30:06 +00:00
Evan Cheng 05799db963 More makefile changes to allow dejagnu tests to pass when system tools default to a different target from the llvm configuration (e.g. 64-bit gcc and 32-bit llvm).
llvm-svn: 67334
2009-03-19 20:27:23 +00:00
Ted Kremenek 67a3bb7af7 Add test cases for PR 3820.
llvm-svn: 67327
2009-03-19 19:50:58 +00:00
Misha Brukman 5182b758a0 Renamed unittest files to have a consistent {Tt}est suffix.
llvm-svn: 67326
2009-03-19 19:09:48 +00:00
Ted Kremenek 95cd5c6b84 Per Daniel's suggestion, remove default case from switch statement to make
uncaught language cases a compile warning instead of a runtime error.

llvm-svn: 67325
2009-03-19 19:02:20 +00:00
Chris Lattner 8fda6749aa add link to new page
llvm-svn: 67324
2009-03-19 18:58:22 +00:00
Chris Lattner 3d26bc8fdf link to diags page.
llvm-svn: 67323
2009-03-19 18:57:33 +00:00
Chris Lattner 2302ee59e1 move most of the diags info out to its own file.
llvm-svn: 67321
2009-03-19 18:56:04 +00:00
Douglas Gregor 19367f54e2 Allow notes to be printed following a fatal error, then suppress any
diagnostics following those notes. 

Make exceeding the template instantiation depth a fatal error.

Thanks to Daniel for pointing out the problem!

llvm-svn: 67320
2009-03-19 18:55:06 +00:00
Dan Gohman 1026a8001f SADDO and UADDO are commutative.
llvm-svn: 67319
2009-03-19 18:53:45 +00:00
Chris Lattner 136d84dbeb split diagnostics examples out to its own file.
llvm-svn: 67318
2009-03-19 18:52:17 +00:00
Douglas Gregor 2797d32926 Add a clarifying comment about HasPrototype's computation
llvm-svn: 67316
2009-03-19 18:33:54 +00:00
Ted Kremenek f65a0b6e21 Support langkind_cxx_pch when determining the language dialect.
llvm-svn: 67315
2009-03-19 18:21:42 +00:00
Fariborz Jahanian d302bbd0c1 When looking for property name (or getter method) in a
dot-syntax expression after earching the list of protocols
in the qualified-id, must keep searching the protocol list
of each of the protocols in the list.

llvm-svn: 67314
2009-03-19 18:15:34 +00:00
Douglas Gregor 3729f240af If a function is declared as, e.g.,
F f;

where F is a typedef of a function type, then the function "f" has a
prototype. This is a slight tweak to Chris's suggested fix in
PR3817. Fixes PR3817 and PR3840.

llvm-svn: 67313
2009-03-19 18:14:46 +00:00
Dale Johannesen 2050968df9 Clear the cached cost when removing a function in
the inliner; prevents nondeterministic behavior
when the same address is reallocated.
Don't build call graph nodes for debug intrinsic calls;
they're useless, and there were typically a lot of them.

llvm-svn: 67311
2009-03-19 18:03:56 +00:00
Daniel Dunbar 403c468065 Driver/clang: -mattr strings were not comma separated.
- Apologies for commits w/o test cases; they are coming.

llvm-svn: 67310
2009-03-19 17:36:04 +00:00
Dan Gohman 37061eef5d Add a liveness analysis pass for LLVM IR values. This computes
the set of blocks in which values are used, the set in which
values are live-through, and the set in which values are
killed. For the live-through and killed sets, conservative
approximations are used.

llvm-svn: 67309
2009-03-19 17:29:04 +00:00
Douglas Gregor 90a1a65194 Introduce a new expression type, UnresolvedDeclRefExpr, that describes
dependent qualified-ids such as

  Fibonacci<N - 1>::value

where N is a template parameter. These references are "unresolved"
because the name is dependent and, therefore, cannot be resolved to a
declaration node (as we would do for a DeclRefExpr or
QualifiedDeclRefExpr). UnresolvedDeclRefExprs instantiate to
DeclRefExprs, QualifiedDeclRefExprs, etc.

Also, be a bit more careful about keeping only a single set of
specializations for a class template, and instantiating from the
definition of that template rather than a previous declaration. In
general, we need a better solution for this for all TagDecls, because
it's too easy to accidentally look at a declaration that isn't the
definition.

We can now process a simple Fibonacci computation described as a
template metaprogram.

llvm-svn: 67308
2009-03-19 17:26:29 +00:00
Dale Johannesen e4f361212b Fix comment typo.
llvm-svn: 67307
2009-03-19 17:23:29 +00:00