Commit Graph

56520 Commits

Author SHA1 Message Date
Ted Kremenek b36e01d87e Fix crash reported in <rdar://problem/6695527>. We now have
SVal::GetRValueSymbolVal do the checking if we can symbolicate a type instead of
having BasicStoreManager do it (which wasn't always doing the check
consistently). Having this check in SVal::GetRValueSymbolVal keeps the check in
one centralized place.

llvm-svn: 67245
2009-03-18 22:10:22 +00:00
Ted Kremenek 4724b8262f tblgen -gen-clang-diags-options: Output OptionTable entries in lexicographic
order.

llvm-svn: 67244
2009-03-18 21:36:46 +00:00
Daniel Dunbar 6f66877ebf Driver: Lookup program names using llvm::sys::Program::FindProgramByName
if our usual methods fail. This isn't necessary for running the tool,
but improves the accuracy of logging output.

Also, have GCC tools lookup gcc program path.

llvm-svn: 67243
2009-03-18 21:34:08 +00:00
Ted Kremenek bf76c6d971 'tblgen -gen-clang-diags-options' now outputs the OptionTable:
static const WarningOption OptionTable[] = {
    {"unused-macros", DIAGS(UnusedMacrosDiags)}
    ...
  };

This table is not yet properly sorted.

llvm-svn: 67242
2009-03-18 21:28:47 +00:00
Mike Stump fc17674d6b The eventual name of this will be clang, might as well start now.
llvm-svn: 67241
2009-03-18 21:19:11 +00:00
Daniel Dunbar 328d4f0da8 Driver: Update test case.
llvm-svn: 67240
2009-03-18 21:17:39 +00:00
Ted Kremenek 4a330b7ec1 Add another Clang TableGen-backend (-gen-clang-diags-options) for emitting
declarations for controlling groups of warnings. Currently this transforms:

  def UnusedMacrosDiags : Option<"unused-macros", [pp_macro_not_used]>;
  
into:

  static const diag::kind UnusedMacrosDiags[] = { diag::pp_macro_not_used };

llvm-svn: 67239
2009-03-18 21:16:16 +00:00
Ted Kremenek 8fd3c5933d Add stub TableGen file for diagnostic options.
llvm-svn: 67238
2009-03-18 21:13:53 +00:00
Chris Lattner d14705b9b4 silence some errors that should not apply to .S files on code like:
''
   '
 '

llvm-svn: 67237
2009-03-18 21:10:12 +00:00
Chris Lattner 2d17ab783b when preprocessing a .S file, unknown directives should just be passed through,
and the token after the # should be expanded if it is not a valid directive.
This allows us to transform things like:

#define FOO BAR
# FOO

into # BAR, even though FOO is not normally expanded for directives.

This should fix PR3833

llvm-svn: 67236
2009-03-18 21:00:25 +00:00
Chris Lattner 2534324a4e properly form a full token for # before calling HandleDirective.
llvm-svn: 67235
2009-03-18 20:58:27 +00:00
Chris Lattner 5eb8ae2453 This is not considered a preprocessor directive in .S files:
# 4 

llvm-svn: 67233
2009-03-18 20:41:10 +00:00
Chris Lattner 0f6dc78cfe include the null at the end of a memorybuffer as part of the buffer.
This allows tblgen to handle include "foo.td" when the quote is exactly
the last character in a file.  rdar://6695728

llvm-svn: 67232
2009-03-18 20:36:45 +00:00
Chris Lattner 5def81401f constructs like:
#define Y X ## .
Y

are ok in .S files.

llvm-svn: 67231
2009-03-18 20:31:57 +00:00
Gabor Greif 7b5243a1fc added type dependent testcase
llvm-svn: 67230
2009-03-18 20:26:44 +00:00
Daniel Dunbar 68b01a03ba Driver: Support ToolChain specific path lists to search for files and
programs.

llvm-svn: 67229
2009-03-18 20:26:19 +00:00
Daniel Dunbar da382a88bf Driver: Get executable path using llvm::sys::Path::GetMainExecutable.
llvm-svn: 67228
2009-03-18 20:25:53 +00:00
Mike Stump 0bb5f76493 Add version information to ISO style test results.
llvm-svn: 67227
2009-03-18 20:25:18 +00:00
Gabor Greif 8c97d18445 incorporate review comment (about the optimization when we have a non-typedependent expression)
llvm-svn: 67226
2009-03-18 20:12:58 +00:00
Mike Stump 25d1dc2a20 Move generated file to ObjDir.
llvm-svn: 67225
2009-03-18 20:12:50 +00:00
Daniel Dunbar c230443178 PR3835: Interaction with ABI structure passing can inhibit
readnone/readonly attributes.

llvm-svn: 67224
2009-03-18 19:51:01 +00:00
Daniel Dunbar e627c1cc0f Driver: Construct temporary file names.
- This is still suboptimal, but should at least be workable.

llvm-svn: 67223
2009-03-18 19:34:39 +00:00
Ted Kremenek f3d5e6c32f HTML rewriter: Don't replace tabs with spaces by default.
llvm-svn: 67221
2009-03-18 18:47:46 +00:00
Mike Stump 1dca7c0061 Add revision information.
llvm-svn: 67220
2009-03-18 18:45:55 +00:00
Chris Lattner ab17fb2c98 fix the more complex cases by actually codegen'ing the right expr :)
llvm-svn: 67219
2009-03-18 18:30:44 +00:00
Chris Lattner 28bcf1a429 add codegen support for casting an element to a union.
There are some more complex cases (_Complex and structs)
that I'm still working on.

llvm-svn: 67218
2009-03-18 18:28:57 +00:00
Daniel Dunbar d175d9753b Driver: Don't warn about unused arguments if there are Driver errors
(brings code in line with diagnostic.

llvm-svn: 67217
2009-03-18 18:03:46 +00:00
Gabor Greif 3db2902f02 simplify logic, isInvalid check is redundant
llvm-svn: 67216
2009-03-18 17:53:25 +00:00
Bill Wendling 7b06cbe6d4 These tests are now passing on Darwin because of r67139.
llvm-svn: 67215
2009-03-18 17:45:11 +00:00
Mike Stump 367fee6664 Be sure to not add weak import, if we are ignoring it.
llvm-svn: 67214
2009-03-18 17:39:31 +00:00
Chris Lattner 70240a84c7 remove two xfailed tests. These aren't doing any good for us until serialization is revisited.
llvm-svn: 67213
2009-03-18 17:16:30 +00:00
Chris Lattner 514fc5b143 aha, DAE does have to think about PHI nodes. Many thanks to "Dr Evil" (aka Duncan)
for pointing this out :)

llvm-svn: 67212
2009-03-18 16:48:45 +00:00
Chris Lattner 595923ff75 Fix PR3826 - InstComb assert with vector shift, by not calling ComputeNumSignBits on a vector.
llvm-svn: 67211
2009-03-18 16:32:19 +00:00
Chris Lattner ab8022055a add an assertion to make it clear that PHI nodes are not allowed.
llvm-svn: 67210
2009-03-18 16:23:56 +00:00
Ted Kremenek c7182d3d4f Refactor 'Warning', 'Extension', and 'ExtWarn' TableGen classes to subclass
'DiagnosticControlled'.

llvm-svn: 67209
2009-03-18 16:00:17 +00:00
Mike Stump bc7d67ce08 Add codegen support for aggregate BlockDeclRefExprs.
llvm-svn: 67207
2009-03-18 15:54:29 +00:00
Mike Stump 3b79d59be7 Fix URL trimming for version information.
llvm-svn: 67206
2009-03-18 15:19:35 +00:00
Mike Stump 38cae30095 Ignore weak import on properties.
llvm-svn: 67205
2009-03-18 15:05:17 +00:00
Mike Stump 02537142c1 Improve version number.
llvm-svn: 67204
2009-03-18 14:00:02 +00:00
Zhou Sheng 4e2af3cb55 Explicitly check for StoreInst, do not lose the chance to delete
unused loads or bitcasts.

llvm-svn: 67202
2009-03-18 12:48:48 +00:00
Zhou Sheng 05bea906c1 Revert my previous change on Local.cpp, instead, fix the bug on scalarrepl.
If the instruction has no users, it is also not only used by debug info 
and should not be deleted.

llvm-svn: 67194
2009-03-18 10:13:08 +00:00
Daniel Dunbar a2aedc6943 Driver: Port Clang argument translation.
llvm-svn: 67193
2009-03-18 10:01:51 +00:00
Daniel Dunbar e6c8319943 Driver: Bug fix, derived .gch names sometimes started with "/".
llvm-svn: 67192
2009-03-18 09:58:30 +00:00
Rafael Espindola d2b64fc65b Add -relocation-model=pic so that the test works
both in Linux and Darwin.

llvm-svn: 67191
2009-03-18 09:38:28 +00:00
Daniel Dunbar d72468a61b ccc: Pass --relocation-model as separate arguments (to match Driver).
llvm-svn: 67190
2009-03-18 09:36:19 +00:00
Daniel Dunbar 7591f29f7c Driver: Add argument translation utilities to ArgList.
- Support things like telling which -ffoo -fno-foo option won, and
   forwarding all arguments matching a certain set of options to the
   tool.

llvm-svn: 67189
2009-03-18 09:29:36 +00:00
Daniel Dunbar a3246a0638 Driver: Lift out common GCC tool and implement generic GCC tool
argument translation.

Also, stub out clang tool implementation a bit more.

llvm-svn: 67185
2009-03-18 08:07:30 +00:00
Daniel Dunbar 72c33f5657 Driver: Forgot to mark -### as a driver option.
llvm-svn: 67184
2009-03-18 08:03:24 +00:00
Daniel Dunbar dcd05482bd Driver: Add assert and FIXME; arguments which act as linker inputs
(e.g., -filelist) are currently broken.

llvm-svn: 67183
2009-03-18 08:02:40 +00:00
Daniel Dunbar 8eba365d36 Driver: Provide Arg::render implementations.
llvm-svn: 67182
2009-03-18 08:01:48 +00:00