Commit Graph

136777 Commits

Author SHA1 Message Date
Sean Callanan 5540094ccd Extra safeguards to ensure that we never query
the runtime if we have complete debug information
for a class.

Also made the Objective-C language runtime return
NULL when asked for the complete debug information
(i.e., information from DWARF, not information from
the runtime) if that information isn't present.  It
used to return a non-authoritative version, which
made it hard for clients to determine whether
complete debug information was available.

<rdar://problem/12608895>

llvm-svn: 167299
2012-11-02 17:09:58 +00:00
Alexey Samsonov 58358897a3 [Sanitizer] Add internal_isatty to sanitizer_libc and PrintsToTty to determine whether error reports are printed to terminal
llvm-svn: 167298
2012-11-02 15:18:34 +00:00
Alexey Samsonov f7a24c4e2b [Sanitizer] fix printf unittest on 32-bit arch
llvm-svn: 167297
2012-11-02 14:28:17 +00:00
Alexey Samsonov 008274440a [Sanitizer] move unit test for Printf from tsan to sanitizer_common
llvm-svn: 167296
2012-11-02 12:36:11 +00:00
Alexey Samsonov 9bdb63ae0d Fix whitespaces
llvm-svn: 167295
2012-11-02 12:20:34 +00:00
Alexey Samsonov ad9d65feb8 [TSan] finally remove TsanPrintf in favor of Printf from sanitizer_common
llvm-svn: 167294
2012-11-02 12:17:51 +00:00
NAKAMURA Takumi 51466d7622 clang/test/CodeGen/bitfield-promote.c: Add explicit triple for now. It has been failing for big endian targets, for example, ppc.
llvm-svn: 167293
2012-11-02 09:59:12 +00:00
NAKAMURA Takumi 510db83782 clang/test/CodeGen/bitfield-promote.c: FileCheck-ize.
llvm-svn: 167292
2012-11-02 09:59:06 +00:00
Alexey Samsonov 20ba98fdb1 [Sanitizer] Use kStderrFd constant instead of hardcoded 2
llvm-svn: 167291
2012-11-02 09:38:47 +00:00
Alexey Samsonov fd67c83e7e [Sanitizer]: add __sanitizer_set_report_fd function to alter file descriptor for error reports
llvm-svn: 167290
2012-11-02 09:23:36 +00:00
Duncan Sands 47ef7cffb8 Enable the assertion in getIntPtrType (I've audited all users of this method and
they are now all correct; hopefully the buildbots will agree!).

llvm-svn: 167289
2012-11-02 09:02:37 +00:00
Chandler Carruth b62807a95c Add a testcase to loop-idiom to cover PR14241 when we start handling
strided loops again.

llvm-svn: 167287
2012-11-02 08:40:24 +00:00
Chandler Carruth 099f5cb031 Revert the switch of loop-idiom to use the new dependence analysis.
The new analysis is not yet ready for prime time. It has a *critical*
flawed assumption, and some troubling shortages of testing. Until it's
been hammered into better shape, let's stick with the working code. This
should be easy to revert itself when the analysis is ready.

Fixes PR14241, a miscompile of any memcpy-able loop which uses a pointer
as the induction mechanism. If you have been seeing miscompiles in this
revision range, you really want to test with this backed out. The
results of this miscompile are a bit subtle as they can lead to
downstream passes concluding things are impossible which are in fact
possible.

Thanks to David Blaikie for the majority of the reduction of this
miscompile. I'll be checking in the test case in a non-revert commit.

Revesions reverted here:

r167045: LoopIdiom: Fix a serious missed optimization: we only turned
         top-level loops into memmove.
r166877: LoopIdiom: Add checks to avoid turning memmove into an infinite
         loop.
r166875: LoopIdiom: Recognize memmove loops.
r166874: LoopIdiom: Replace custom dependence analysis with
         DependenceAnalysis.
llvm-svn: 167286
2012-11-02 08:33:25 +00:00
Duncan Sands a17bb1419f Fix an obvious typo that causes an assertion failure when running
test/Transforms/GVN/rle.ll if the (currently disabled) check for a
pointer type in getIntPtrType is turned on.

llvm-svn: 167285
2012-11-02 07:49:32 +00:00
Tobias Grosser dcebf1e9da Tests: remove ModuleID lines
llvm-svn: 167284
2012-11-02 06:09:20 +00:00
Tobias Grosser 41b20a62c9 Tests: move content of .c files in .ll
llvm-svn: 167283
2012-11-02 06:08:39 +00:00
Chandler Carruth acc748b2b5 Fix sign compare warning. Patch by Mahesha HS.
llvm-svn: 167282
2012-11-02 05:24:00 +00:00
Eli Friedman ff421c97e1 Delete lines which do nothing from DiagnosticGroups.td.
llvm-svn: 167281
2012-11-02 03:35:13 +00:00
Argyrios Kyrtzidis 19c1706ecc [libclang] Correct how the index inside the local preprocessed entities array
is getting converted to a global PreprocessedEntityID.

llvm-svn: 167280
2012-11-02 02:31:22 +00:00
Eli Friedman 960755bafd Add missing diagnostic group to format string warning.
llvm-svn: 167279
2012-11-02 02:14:44 +00:00
NAKAMURA Takumi 53eefc43f4 analyzer-plugin/MainCallChecker.cpp: Fixup corresponding to r167275.
llvm-svn: 167278
2012-11-02 02:04:01 +00:00
Jordan Rose b9ed61f93d [analyzer] Convert some of the harder cases over to ProgramStateTrait macros.
Add FIXMEs for the traits visible from multiple translation units.
Currently the macros hide their key types in an anonymous namespace.

llvm-svn: 167277
2012-11-02 01:54:42 +00:00
Jordan Rose 0c153cb277 [analyzer] Use nice macros for the common ProgramStateTraits (map, set, list).
Also, move the REGISTER_*_WITH_PROGRAMSTATE macros to ProgramStateTrait.h.

This doesn't get rid of /all/ explicit uses of ProgramStatePartialTrait,
but it does get a lot of them.

llvm-svn: 167276
2012-11-02 01:54:06 +00:00
Jordan Rose e10d5a7659 [analyzer] Rename 'EmitReport' to 'emitReport'.
No functionality change.

llvm-svn: 167275
2012-11-02 01:53:40 +00:00
Eli Friedman 8f88f06dd2 Tweak wording and add diagnostic groups to misc diagnostics.
llvm-svn: 167274
2012-11-02 01:40:23 +00:00
Eli Friedman 0d0355abfc Change diagnostics for enums with fixed underlying type so in C++98 mode, we cite C++11.
llvm-svn: 167273
2012-11-02 01:34:28 +00:00
NAKAMURA Takumi d1cc9db3d6 libprofile/CommonProfiling.c: Fix according to C89.
llvm-svn: 167272
2012-11-02 01:32:02 +00:00
Manuel Klimek bd0e2b7111 Insert interception point onStartOfTranslationUnit.
Often users of the ASTMatchers want to add tasks that are done once per
translation unit, for example, cleaning up caches. Combined with the
interception point for the end of source file one can add to the factory
creation, this covers the cases we've seen users need.

llvm-svn: 167271
2012-11-02 01:31:03 +00:00
Manman Ren 7dcadc6dbe PGO: allows the profile data file name to be specified by the LLVMPROF_OUTPUT
environment variable.

This allows parallel make for profiling code, without it there are file
collisions as each parallel run uses the default file name.

There is already code in the runtime library to specify the output file name
via the command line, but this only works for programs which already process
argc/argv.  This patch builds on that support.

Patch by Alastair Murray.

llvm-svn: 167269
2012-11-02 01:10:15 +00:00
Richard Trieu 1f3ea7b6b5 When finding a '(' after '::', emit error with hint to remove '(' and matching
')', if found.  Don't crash.
Fixes PR11852.

llvm-svn: 167268
2012-11-02 01:08:58 +00:00
Jason Molenda e7a9168908 Set the MACOSX_DEPLOYMENT_TARGET in a few more places.
llvm-svn: 167267
2012-11-02 00:35:51 +00:00
Quentin Colombet 4e172067b2 Update the front end to use minsize attribute
llvm-svn: 167266
2012-11-01 23:55:47 +00:00
Manman Ren 3d5af279b1 OutputArg: added an index of the original argument to match the change to
InputArg in r165616.

This will enable us to get the actual type for both InputArg and OutputArg.

rdar://9932559

llvm-svn: 167265
2012-11-01 23:49:58 +00:00
Jason Molenda 4cbf8f3d4b Set the MACOSX_DEPLOYMENT_TARGET for Debug/Release builds
(but not BuildAndIntegration builds).

llvm-svn: 167264
2012-11-01 23:37:53 +00:00
Jason Molenda cc57a38325 Change DataExtractor::Dump() to use a series of if..else if
statements instead of a switch for the size of the floating
point types; some architectures sizeof double and sizeof long
double are the same and that's invalid in a switch.

Fix the LLDB_DISABLE_PYTHON ifdef block in FormatManager::LoadObjCFormatters
so it builds on arm again.

llvm-svn: 167263
2012-11-01 23:35:19 +00:00
Greg Clayton 2508b9b8d3 <rdar://problem/12585314>
LLDB now provides base class offsets (virtual and non virtual) to Clang's record layout. We previously were told this wasn't necessary, but it is when pragma pack gets involved.

llvm-svn: 167262
2012-11-01 23:20:02 +00:00
Richard Smith 9c6890a792 Simplify: replace getContext().getLangOpts() with just getLangOpts().
llvm-svn: 167261
2012-11-01 22:30:59 +00:00
Richard Smith 3494df490b Clean up misapplication of diff.
llvm-svn: 167260
2012-11-01 22:16:43 +00:00
Richard Smith de67068fc1 Split emission of -ftrapv checks and -fcatch-undefined-behavior checks into
separate functions, since they share essentially no code.

llvm-svn: 167259
2012-11-01 22:15:34 +00:00
Richard Smith e29c441a89 Remove divison-by-zero checks from -ftrapv. These checks were incompatible with
g++'s -ftrapv, failed to call the -ftrapv overflow handler, and are still
available under -fcatch-undefined-behavior.

llvm-svn: 167258
2012-11-01 22:13:39 +00:00
Hal Finkel 376f82d5d3 BBVectorize: Commit the rest of the test-case change.
llvm-svn: 167257
2012-11-01 21:57:27 +00:00
Hal Finkel 560545b85f BBVectorize: Use target costs for incoming and outgoing values instead of the depth heuristic.
When target cost information is available, compute explicit costs of inserting and
extracting values from vectors. At this point, all costs are estimated using the
target information, and the chain-depth heuristic is not needed. As a result, it is now, by
default, disabled when using target costs.

llvm-svn: 167256
2012-11-01 21:50:12 +00:00
Tobias Grosser 3eb851f370 Remove runtime tests from polly test suite
Similar to LLVM we now follow the policy of only having LLVM-IR level tests in
the Polly test suite. Testing for miscompilation of larger programs should be
done with the llvm test suite.

llvm-svn: 167255
2012-11-01 21:44:59 +00:00
Nick Kledzik 8cf031e4cc rename dylibNamesToOrdinal now that it is an ivar
llvm-svn: 167254
2012-11-01 21:44:45 +00:00
Greg Clayton aa0c70e38c Get rid of hack by making the actual call public. This was causing the lldb-platform to not be able to link.
llvm-svn: 167253
2012-11-01 21:35:16 +00:00
Richard Trieu 6df8945f04 Fix the template type diffing to handle integral template arguments.
llvm-svn: 167252
2012-11-01 21:29:28 +00:00
Tobias Grosser 81a1c75035 Dependences: Add support to calculate memory based dependences
Instead of calculating exact value (flow) dependences, it is also possible to
calculate memory based dependences. Sometimes memory based dependences are a lot
easier to calculate. To evaluate the benefits, we add an option to calculate
memory based dependences (use -polly-value-dependences=false).

llvm-svn: 167251
2012-11-01 21:28:32 +00:00
Sean Callanan 0c23368a34 Fixes to make the test suite work better when
explicitly pointed at an LLDB framework and
executable.

llvm-svn: 167250
2012-11-01 21:23:21 +00:00
Matt Beaumont-Gay 4a2874ecc6 Silence -Wformat on platforms where uint64_t is unsigned long.
llvm-svn: 167249
2012-11-01 20:26:42 +00:00
Andrew Kaylor 0eece8d7f5 Fixed format string to avoid pointer truncation during 64-bit debugging.
llvm-svn: 167247
2012-11-01 19:49:21 +00:00