9 years agoModified .lldb-loggings now to direct the lldb log files to the same session director...
Johnny Chen [Wed, 22 Aug 2012 20:25:33 +0000 (20:25 +0000)]
Modified .lldb-loggings now to direct the lldb log files to the same session directory which also houses the test logs.

llvm-svn: 162387

9 years agoDespite me asking Jordan to do r162313, revert it. We can provide
Ted Kremenek [Wed, 22 Aug 2012 19:58:20 +0000 (19:58 +0000)]
Despite me asking Jordan to do r162313, revert it.  We can provide
another way to whitelist these special cases.  This is an intermediate patch.

llvm-svn: 162386

9 years ago[ms-inline asm] Simplify logic. No functional change intended.
Chad Rosier [Wed, 22 Aug 2012 19:50:28 +0000 (19:50 +0000)]
[ms-inline asm] Simplify logic.  No functional change intended.

llvm-svn: 162385

9 years agoRemove BasicConstraintManager. It hasn't been in active service for a while.
Ted Kremenek [Wed, 22 Aug 2012 19:47:13 +0000 (19:47 +0000)]
Remove BasicConstraintManager.  It hasn't been in active service for a while.

As part of this change, I discovered that a few of our tests were not testing
the RangeConstraintManager.  Luckily all of those passed when I moved them
over to use that constraint manager.

llvm-svn: 162384

9 years agoSimplifyLibCalls: Give all safely-shrinkable libcalls the same treatment.
Benjamin Kramer [Wed, 22 Aug 2012 19:39:15 +0000 (19:39 +0000)]
SimplifyLibCalls: Give all safely-shrinkable libcalls the same treatment.

llvm-svn: 162383

9 years ago[ms-inline asm] Start sending non-simple inline asms to the AsmParser.
Chad Rosier [Wed, 22 Aug 2012 19:18:30 +0000 (19:18 +0000)]
[ms-inline asm] Start sending non-simple inline asms to the AsmParser.

The parser still can't handle all cases, so fall back to emitting a simple
MSAsmStmt if we get into trouble.

llvm-svn: 162382

9 years ago[ms-inline asm] Avoid a false positive assertion
Chad Rosier [Wed, 22 Aug 2012 19:14:29 +0000 (19:14 +0000)]
[ms-inline asm] Avoid a false positive assertion

Assertion failed: (Start.isValid() == End.isValid() && "Start and end should
either both be valid or both be invalid!")

when parsing inline asm.  SMLoc assumes that the first char * in the source is
invalid.  However, when parsing an inline asm the mnemonic is at this location.
I don't want to change SMLoc, so use a trivial workaround.

llvm-svn: 162381

9 years agoMake ceil/floor/nearbyint/rint/round const even with -fmath-errno.
Benjamin Kramer [Wed, 22 Aug 2012 18:50:01 +0000 (18:50 +0000)]
Make ceil/floor/nearbyint/rint/round const even with -fmath-errno.

The conditions described by POSIX can never happen with IEEE-754 floats.
When the function is const we can emit a single sse4.1 instruction for
it, without losing anything :)

llvm-svn: 162379

9 years agoDemonstrate how to use the config file and the pre-flight functionality to route...
Johnny Chen [Wed, 22 Aug 2012 18:48:13 +0000 (18:48 +0000)]
Demonstrate how to use the config file and the pre-flight functionality to route the lldb gdb-remote log messages
into individually named log destinations.  In the simple usage-lldb-loggings example, we ran two cases which resulted
in two lldb_log files.

llvm-svn: 162378

9 years agoRemove further outdated "settings" code and also implement a few missing things.
Greg Clayton [Wed, 22 Aug 2012 18:39:03 +0000 (18:39 +0000)]
Remove further outdated "settings" code and also implement a few missing things.

llvm-svn: 162376

9 years agoMath builtin definition tweaks.
Benjamin Kramer [Wed, 22 Aug 2012 18:16:02 +0000 (18:16 +0000)]
Math builtin definition tweaks.

There were missed optimizations when the system headers didn't have attributes
in place, specifically:

- Add copysign, exp2, log2, nearbyint, rint and trunc to the list.
  These are functions that get inlined by LLVM's optimizer, but only when they
  have the right attributes.
- Mark copysign, fabs, fmax, fmin and trunc const unconditionally.
  Previously these were only const with -fno-math-errno, but they never set
  errno per POSIX.

For ceil/floor/nearbyint/round I'm not aware of any implementation that sets
errno, but POSIX says it may signal overflow so I left them alone for now.

llvm-svn: 162375

9 years agoASTContext::getCommentForDecl: add comment.
Dmitri Gribenko [Wed, 22 Aug 2012 18:12:19 +0000 (18:12 +0000)]
ASTContext::getCommentForDecl: add comment.

llvm-svn: 162374

9 years agoFixed a Linux building bug pointed out by Daniel Malea.
Filipe Cabecinhas [Wed, 22 Aug 2012 18:10:45 +0000 (18:10 +0000)]
Fixed a Linux building bug pointed out by Daniel Malea.

llvm-svn: 162373

9 years agoFix wrong directory pathname.
Johnny Chen [Wed, 22 Aug 2012 17:53:02 +0000 (17:53 +0000)]
Fix wrong directory pathname.

llvm-svn: 162372

9 years agoAttaching comments to declarations: when documentation is requested for an
Dmitri Gribenko [Wed, 22 Aug 2012 17:44:32 +0000 (17:44 +0000)]
Attaching comments to declarations: when documentation is requested for an
implicit instantiation, look for documentation attached to the template.

llvm-svn: 162371

9 years agoWhitespace.
Chad Rosier [Wed, 22 Aug 2012 17:34:11 +0000 (17:34 +0000)]

llvm-svn: 162370

9 years agoAdd test case for r162368.
Chad Rosier [Wed, 22 Aug 2012 17:31:04 +0000 (17:31 +0000)]
Add test case for r162368.

llvm-svn: 162369

9 years agoAdd a few float shrinking optimizations to SimplifyLibCalls. Unsafe
Chad Rosier [Wed, 22 Aug 2012 17:22:33 +0000 (17:22 +0000)]
Add a few float shrinking optimizations to SimplifyLibCalls.  Unsafe
optimizations are guarded by the -enable-double-float-shrink LLVM option.
Last bit of PR13574.  Patch by Weiming Zhao <weimingz@codeaurora.org>.

llvm-svn: 162368

9 years agoTidy up a few more uses of MF.getFunction()->getName().
David Blaikie [Wed, 22 Aug 2012 17:18:53 +0000 (17:18 +0000)]
Tidy up a few more uses of MF.getFunction()->getName().

Based on CR feedback from r162301 and Craig Topper's refactoring in r162347
here are a few other places that could use the same API (& in one instance drop
a Function.h dependency).

llvm-svn: 162367

9 years agoReimplemented the code that backed the "settings" in lldb. There were many issues...
Greg Clayton [Wed, 22 Aug 2012 17:17:09 +0000 (17:17 +0000)]
Reimplemented the code that backed the "settings" in lldb. There were many issues with the previous implementation:
- no setting auto completion
- very manual and error prone way of getting/setting variables
- tons of code duplication
- useless instance names for processes, threads

Now settings can easily be defined like option values. The new settings makes use of the "OptionValue" classes so we can re-use the option value code that we use to set settings in command options. No more instances, just "does the right thing".

llvm-svn: 162366

9 years ago[analyzer] Restructure discussion of DynamicTypeInfo and RuntimeDefinition.
Jordan Rose [Wed, 22 Aug 2012 17:13:27 +0000 (17:13 +0000)]
[analyzer] Restructure discussion of DynamicTypeInfo and RuntimeDefinition.

Since DynamicTypeInfo is not inherently related to inlining or to dynamic
calls, it makes more sense (to me) to discuss it first.

Also fix some typos, massage some grammar, and (hopefully) improve precision
and clarity.

llvm-svn: 162365

9 years ago[analyzer] Per feedback, re-structure the docs for ExprInspection checks.
Jordan Rose [Wed, 22 Aug 2012 17:13:22 +0000 (17:13 +0000)]
[analyzer] Per feedback, re-structure the docs for ExprInspection checks.

Also, remove the FIXME about merging -analyzer-stats and the debug.Stats
checker. This would be a bad idea because simply running debug.Stats can
affect the output of -analyzer-stats.

llvm-svn: 162364

9 years agoAdd a new helper function, AddOpt(F1, F1, Opt), as part of PR13574. No
Chad Rosier [Wed, 22 Aug 2012 16:52:57 +0000 (16:52 +0000)]
Add a new helper function, AddOpt(F1, F1, Opt), as part of PR13574.  No
functional change intended.  Patch by Weiming Zhao <weimingz@codeaurora.org>.

llvm-svn: 162363

9 years agoReduce duplicated hash map lookups.
Benjamin Kramer [Wed, 22 Aug 2012 15:37:57 +0000 (15:37 +0000)]
Reduce duplicated hash map lookups.

llvm-svn: 162362

9 years agoReduce duplicated hash map lookups.
Benjamin Kramer [Wed, 22 Aug 2012 15:37:55 +0000 (15:37 +0000)]
Reduce duplicated hash map lookups.

llvm-svn: 162361

9 years agoMerge existing attributes before processing pragmas in friend template
Rafael Espindola [Wed, 22 Aug 2012 14:52:14 +0000 (14:52 +0000)]
Merge existing attributes before processing pragmas in friend template
Fixes pr13662.

llvm-svn: 162360

9 years ago[ASan] use write instead of puts in malloc hooks test for ASan, as puts calls malloc...
Alexey Samsonov [Wed, 22 Aug 2012 13:32:37 +0000 (13:32 +0000)]
[ASan] use write instead of puts in malloc hooks test for ASan, as puts calls malloc on Mac

llvm-svn: 162359

9 years ago[ASan] get rid of ASAN_USE_EXTERNAL_SYMBOLIZER compiler def in favor of __asan_set_sy...
Alexey Samsonov [Wed, 22 Aug 2012 13:31:37 +0000 (13:31 +0000)]
[ASan] get rid of ASAN_USE_EXTERNAL_SYMBOLIZER compiler def in favor of __asan_set_symbolize_callback interface function. Now the user doesn't have to recompile ASan runtime to provide its own symbolizer

llvm-svn: 162358

9 years agoAdded a test for the Python part of SBInputReader callbacks.
Filipe Cabecinhas [Wed, 22 Aug 2012 13:25:58 +0000 (13:25 +0000)]
Added a test for the Python part of SBInputReader callbacks.

llvm-svn: 162357

9 years agoAdded a typemap and wrappers for SBInputReader callbacks
Filipe Cabecinhas [Wed, 22 Aug 2012 13:25:10 +0000 (13:25 +0000)]
Added a typemap and wrappers for SBInputReader callbacks

Now it's possible to use SBInputReader callbacks in Python.

We leak the callback object, unfortunately. A __del__ method can be added
to SBInputReader, but we have no way to check the callback function that
is on the reader. So we can't call Py_DECREF on it when we have our
PythonCallback function. One way to do it is to assume that reified
SBInputReaders always have a Python callback (and always call Py_DECREF).
Another one is to add methods or properties to SBInputReader (or make the
m_callback_function property public).

llvm-svn: 162356

9 years ago[ASan] make ASan malloc/free hooks weak interface functions, overridable by user...
Alexey Samsonov [Wed, 22 Aug 2012 10:12:47 +0000 (10:12 +0000)]
[ASan] make ASan malloc/free hooks weak interface functions, overridable by user. Now the user can control malloc/free hooks without recompiling ASan runtime

llvm-svn: 162355

9 years agoRejected 169195. As Duncan commented, bitcasting to proper type is wrong approach...
Stepan Dyatkovskiy [Wed, 22 Aug 2012 09:33:55 +0000 (09:33 +0000)]
Rejected 169195. As Duncan commented, bitcasting to proper type is wrong approach. We need to insert some valid TRANCATE node here.

llvm-svn: 162354

9 years ago[ASan] fix CMake build: make sure that all ASan runtimes are built at correct directory
Alexey Samsonov [Wed, 22 Aug 2012 09:19:32 +0000 (09:19 +0000)]
[ASan] fix CMake build: make sure that all ASan runtimes are built at correct directory

llvm-svn: 162353

9 years agoFix typo in debug method.
Benjamin Kramer [Wed, 22 Aug 2012 08:38:23 +0000 (08:38 +0000)]
Fix typo in debug method.

llvm-svn: 162352

9 years ago[TSan] switch tsan to using InternalScopedBuffer from sanitizer_common
Alexey Samsonov [Wed, 22 Aug 2012 07:25:52 +0000 (07:25 +0000)]
[TSan] switch tsan to using InternalScopedBuffer from sanitizer_common

llvm-svn: 162351

9 years agoRename 'unbindLoc()' (in ProgramState) and 'Remove()' to
Ted Kremenek [Wed, 22 Aug 2012 06:37:46 +0000 (06:37 +0000)]
Rename 'unbindLoc()' (in ProgramState) and 'Remove()' to
'killBinding()'.  The name is more specific, and one just forwarded
to the other.

Add some doxygen comments along the way.

llvm-svn: 162350

9 years agoRename 'currentX' to 'currX' throughout analyzer and libAnalysis.
Ted Kremenek [Wed, 22 Aug 2012 06:26:15 +0000 (06:26 +0000)]
Rename 'currentX' to 'currX' throughout analyzer and libAnalysis.
Also rename 'getCurrentBlockCounter()' to 'blockCount()'.

This ripples a bunch of code simplifications; mostly aesthetic,
but makes the code a bit tighter.

llvm-svn: 162349

9 years agoRename 'getConjuredSymbol*' to 'conjureSymbol*'.
Ted Kremenek [Wed, 22 Aug 2012 06:26:06 +0000 (06:26 +0000)]
Rename 'getConjuredSymbol*' to 'conjureSymbol*'.

No need to have the "get", the word "conjure" is a verb too!
Getting a conjured symbol is the same as conjuring one up.

This shortening is largely cosmetic, but just this simple changed
cleaned up a handful of lines, making them less verbose.

llvm-svn: 162348

9 years agoAdd a getName function to MachineFunction. Use it in places that previously did getFu...
Craig Topper [Wed, 22 Aug 2012 06:07:19 +0000 (06:07 +0000)]
Add a getName function to MachineFunction. Use it in places that previously did getFunction()->getName(). Remove includes of Function.h that are no longer needed.

llvm-svn: 162347

9 years agoRemove Store::bindDecl() and Store::bindDeclWithNoInit(), and
Ted Kremenek [Wed, 22 Aug 2012 06:00:18 +0000 (06:00 +0000)]
Remove Store::bindDecl() and Store::bindDeclWithNoInit(), and
all forwarding methods.

This functionality is already covered by bindLoc().

llvm-svn: 162346

9 years agoRename 'BindCompoundLiteral' to 'bindCompoundLiteral' and
Ted Kremenek [Wed, 22 Aug 2012 06:00:12 +0000 (06:00 +0000)]
Rename 'BindCompoundLiteral' to 'bindCompoundLiteral' and
add doxygen comments.

llvm-svn: 162345

9 years agoDon't cache the MBB in the class. Its only used by one function. Change a for loop...
Craig Topper [Wed, 22 Aug 2012 05:59:59 +0000 (05:59 +0000)]
Don't cache the MBB in the class. Its only used by one function. Change a for loop over operands to use unsigned instead of int.

llvm-svn: 162344

9 years ago[analyzer] IPA document: address Ted's review comments (path
Anna Zaks [Wed, 22 Aug 2012 05:38:38 +0000 (05:38 +0000)]
[analyzer] IPA document: address Ted's review comments (path

llvm-svn: 162343

9 years agoMark a function as static since it doesn't use anything in the class.
Craig Topper [Wed, 22 Aug 2012 05:36:44 +0000 (05:36 +0000)]
Mark a function as static since it doesn't use anything in the class.

llvm-svn: 162342

9 years agoRemove stale header file.
Ted Kremenek [Wed, 22 Aug 2012 04:42:05 +0000 (04:42 +0000)]
Remove stale header file.

llvm-svn: 162341

9 years agoAdd register Mips::GP to the list of reserved registers if target is bare-metal
Akira Hatanaka [Wed, 22 Aug 2012 03:18:13 +0000 (03:18 +0000)]
Add register Mips::GP to the list of reserved registers if target is bare-metal
to prevent it from being clobbered. mips uses $gp to access small data section.

This bug was originally reported by Carl Norum.

llvm-svn: 162340

9 years agoAdd option disable-mips-delay-filler. Turn on mips' delay slot filler by
Akira Hatanaka [Wed, 22 Aug 2012 02:51:28 +0000 (02:51 +0000)]
Add option disable-mips-delay-filler. Turn on mips' delay slot filler by

Patch by Carl Norum.

llvm-svn: 162339

9 years agoReview, comment, and reformat IPA.txt, including feedback comments.
Ted Kremenek [Wed, 22 Aug 2012 01:20:05 +0000 (01:20 +0000)]
Review, comment, and reformat IPA.txt, including feedback comments.

Formatting includes:

- removing line wraps (Emacs Cmd-Q), to make text easier to read
- provide useful indentation
- call out caveats and notes more explictly

Stylistically, I prefer the document talk in 3rd person instead of "we".  The
term "we" is unambiguous, and sometimes refers to different things.  I've passed
over the existing paragraphs and made them speak more about specific entities
that compose the analyzer and what they do (e.g., ExprEngine) instead of "we"
referring to the analyzer.

Further, I have substituted some vague concepts such as "state" or "program
state" and replaced them with their precise implementation counterparts (e.g.,
ProgramState).  This makes the document more technically precise throughout the
entire narrative, which would sometimes use vague terms and other times precise

I've placed several comments within the document, which can be seen with
***TMK/COMMENT***, which indicate places that need to be enhanced or clarified,
or called out as questions about intended bheavior.

llvm-svn: 162338

9 years agoTblGen: Make asm-matcher ConvertToMCInst() table driven.
Jim Grosbach [Wed, 22 Aug 2012 01:06:23 +0000 (01:06 +0000)]
TblGen: Make asm-matcher ConvertToMCInst() table driven.

No change in interface or functionality. Purely under-the-hood
details of the generated function that change.

The X86 assembly parser is reduced in size by over 15% and ARM by
over 10%.

No performance change by my measurements.

llvm-svn: 162337

9 years ago[analyzer] Document our debug checkers and ExprInspection's "builtins".
Jordan Rose [Wed, 22 Aug 2012 01:03:39 +0000 (01:03 +0000)]
[analyzer] Document our debug checkers and ExprInspection's "builtins".

llvm-svn: 162336

9 years agoFix a typo in the docs
Marshall Clow [Wed, 22 Aug 2012 00:57:11 +0000 (00:57 +0000)]
Fix a typo in the docs

llvm-svn: 162335

9 years agoFor mips64 switch statements in subroutines could generate
Jack Carter [Wed, 22 Aug 2012 00:49:30 +0000 (00:49 +0000)]
For mips64 switch statements in subroutines could generate
within the codegen EK_GPRel64BlockAddress. This was not
supported for direct object output and resulted in an assertion.

This change adds support for EK_GPRel64BlockAddress for
direct object.

One fallout from this is to turn on rela relocations
for mips64 to match gas.

llvm-svn: 162334

9 years agoInitialize SelectionDAGBuilder's Context in 'init', not in its constructor. The
Richard Smith [Wed, 22 Aug 2012 00:42:39 +0000 (00:42 +0000)]
Initialize SelectionDAGBuilder's Context in 'init', not in its constructor. The
SelectionDAG's 'init' has not been called when the SelectionDAGBuilder is
constructed (in SelectionDAGISel's constructor), so this was previously always
initialized with 0.

llvm-svn: 162333

9 years agordar://problem/11324515
Johnny Chen [Wed, 22 Aug 2012 00:18:43 +0000 (00:18 +0000)]

'add-dsym' (aka 'target symbols add') should display error messages when dsym file is not found
or the dsym uuid does not match any existing modules. Add TestAddDsymCommand.py test file.

llvm-svn: 162332

9 years agoReduce alignment of SmallVector<T> to the required amount, rather than forcing 16...
Richard Smith [Wed, 22 Aug 2012 00:11:07 +0000 (00:11 +0000)]
Reduce alignment of SmallVector<T> to the required amount, rather than forcing 16-byte alignment. This fixes misaligned SmallVector accesses via ExtractValueInst's SmallVector data member.

llvm-svn: 162331

9 years agoConsilidate SmallPtrSet count() followed by insert() into a single insert().
Ted Kremenek [Wed, 22 Aug 2012 00:02:08 +0000 (00:02 +0000)]
Consilidate SmallPtrSet count() followed by insert() into a single insert().

llvm-svn: 162330

9 years agoAdd a few functions to TargetLibraryInfo as part of PR13574.
Chad Rosier [Tue, 21 Aug 2012 23:28:56 +0000 (23:28 +0000)]
Add a few functions to TargetLibraryInfo as part of PR13574.
Patch by Weiming Zhao <weimingz@codeaurora.org>.

llvm-svn: 162329

9 years agoFix test failures in TestWatchpointIter.py due to http://llvm.org/viewvc/llvm-project...
Johnny Chen [Tue, 21 Aug 2012 23:17:04 +0000 (23:17 +0000)]
Fix test failures in TestWatchpointIter.py due to llvm.org/viewvc/llvm-project?rev=162322&view=rev.

llvm-svn: 162328

9 years ago[ms-inline asm] Remove the patchMSAsmStrings function. After some discussion
Chad Rosier [Tue, 21 Aug 2012 23:09:21 +0000 (23:09 +0000)]
[ms-inline asm] Remove the patchMSAsmStrings function.  After some discussion
between Bob, Jim, Eric and I, we've decided to take a slightly different

llvm-svn: 162327

9 years agoAdd an llvm_unreachable to pacify GCC's -Wreturn-type.
Matt Beaumont-Gay [Tue, 21 Aug 2012 22:27:18 +0000 (22:27 +0000)]
Add an llvm_unreachable to pacify GCC's -Wreturn-type.

llvm-svn: 162325

9 years agomake test pass on linux platforms.
Fariborz Jahanian [Tue, 21 Aug 2012 22:21:43 +0000 (22:21 +0000)]
make test pass on linux platforms.

llvm-svn: 162324

9 years agoRemove the process->DisableWatchpoint() and EnableWatchpoint() calls since the sentry...
Johnny Chen [Tue, 21 Aug 2012 22:15:58 +0000 (22:15 +0000)]
Remove the process->DisableWatchpoint() and EnableWatchpoint() calls since the sentry object is already doing that.

llvm-svn: 162323

9 years agordar://problem/12144930
Johnny Chen [Tue, 21 Aug 2012 22:06:34 +0000 (22:06 +0000)]

Watchpoint conditions were hitting watchpoint, smashing LLDB's stack.
Make sure watchpoint is properly disabled and subsequently enabled while performing watchpoint actions.

llvm-svn: 162322

9 years ago[ms-inline asm] Have buildMSAsmString build a vector of unmodified AsmStrings.
Chad Rosier [Tue, 21 Aug 2012 21:56:39 +0000 (21:56 +0000)]
[ms-inline asm] Have buildMSAsmString build a vector of unmodified AsmStrings.
Add a new static function, buildMSAsmPieces, that will break these strings down
into mnemonic and operands.  Upon a match failure, the idea is to use the
ErrorInfo from MatchInstructionImpl to inspect the mnemonic/operand and
decide a course of action.  Unfortunately, there's no easy way to test this at
the moment.

llvm-svn: 162321

9 years agochange function name in my last patch.
Fariborz Jahanian [Tue, 21 Aug 2012 21:52:02 +0000 (21:52 +0000)]
change function name in my last patch.
// rdar://12103400

llvm-svn: 162320

9 years agoobjective-C: Change rules for overriding properties in
Fariborz Jahanian [Tue, 21 Aug 2012 21:45:58 +0000 (21:45 +0000)]
objective-C: Change rules for overriding properties in
class extensions a little. clang now allows readonly property
with no ownership rule (assign, unsafe_unretained, weak, retain,
strong, or copy) with a readwrite property with an ownership rule.
// rdar://12103400

llvm-svn: 162319

9 years ago[analyzer] Set the default IPA mode to 'basic-inlining', which excludes C++.
Jordan Rose [Tue, 21 Aug 2012 21:44:21 +0000 (21:44 +0000)]
[analyzer] Set the default IPA mode to 'basic-inlining', which excludes C++.

Under -analyzer-ipa=basic-inlining, only C functions, blocks, and C++ static
member functions are inlined -- essentially, the calls that behave like simple
C function calls. This is essentially the behavior in Xcode 4.4.

C++ support still has some rough edges, and we don't want users to be worried
about them if they download and run their own checker. (In particular, the
massive number of false positives for analyzing LLVM comes from inlining
defensively-written code in contexts where more aggressive assumptions are
implicitly made. This problem is not unique to C++, but it is exacerbated by
the higher proportion of code that lives in header files in C++.)

The eventual goal is to be comfortable enough with C++ support (and simple
Objective-C support) to advance to -analyzer-ipa=inlining as the default
behavior. See the IPA design notes for more details.

llvm-svn: 162318

9 years ago[analyzer] -analyzer-ipa=inlining is now the default. Remove it from tests.
Jordan Rose [Tue, 21 Aug 2012 21:44:07 +0000 (21:44 +0000)]
[analyzer] -analyzer-ipa=inlining is now the default. Remove it from tests.

The actual change here is a little more complicated than the summary above.
What we want to do is have our generic inlining tests run under whatever
mode is the default. However, there are some tests that depend on the
presence of C++ inlining, which still has some rough edges. These tests have
been explicitly marked as -analyzer-ipa=inlining in preparation for a new
mode that limits inlining to C functions and blocks. This will be the
default until the false positives for C++ have been brought down to
manageable levels.

llvm-svn: 162317

9 years agoUpdate comment to match the reality.
Dmitri Gribenko [Tue, 21 Aug 2012 21:35:58 +0000 (21:35 +0000)]
Update comment to match the reality.

llvm-svn: 162316

9 years agoCommentBriefParser: allow paragraphs to be separated by line of whitespace.
Dmitri Gribenko [Tue, 21 Aug 2012 21:15:34 +0000 (21:15 +0000)]
CommentBriefParser: allow paragraphs to be separated by line of whitespace.
Skip paragraphs that contain only whitespace.

llvm-svn: 162315

9 years agoMaximumSpanningTree::EdgeWeightCompare: Make this comparator actually be a
Richard Smith [Tue, 21 Aug 2012 21:03:40 +0000 (21:03 +0000)]
MaximumSpanningTree::EdgeWeightCompare: Make this comparator actually be a
strict weak ordering, and don't pass possibly-null pointers to dyn_cast.

llvm-svn: 162314

9 years ago[analyzer] Push "references are non-null" knowledge up to the common parent.
Jordan Rose [Tue, 21 Aug 2012 20:52:19 +0000 (20:52 +0000)]
[analyzer] Push "references are non-null" knowledge up to the common parent.

This reduces duplication across the Basic and Range constraint managers, and
keeps their internals free of dealing with the semantics of C++. It's still
a little unfortunate that the constraint manager is dealing with this at all,
but this is pretty much the only place to put it so that it will apply to all
symbolic values, even when embedded in larger expressions.

llvm-svn: 162313

9 years agoFix misaligned access in MachO object file reader: despite containing an
Richard Smith [Tue, 21 Aug 2012 20:52:03 +0000 (20:52 +0000)]
Fix misaligned access in MachO object file reader: despite containing an
int64_t, Symbol64TableEntry is actually only stored with 4-byte alignment
within the file.

The usage of #pragma pack here is copied from the corresponding code in
Support/Endian.h, so shouldn't introduce any new portability problems.

llvm-svn: 162312

9 years agoFix unaligned memory accesses when performing relocations in X86 JIT. There's
Richard Smith [Tue, 21 Aug 2012 20:48:36 +0000 (20:48 +0000)]
Fix unaligned memory accesses when performing relocations in X86 JIT. There's
no cost to using memcpy here: the fixed code is optimized by LLVM to perfect
machine code.

llvm-svn: 162311

9 years agoDon't pass a null pointer to cast<> in its unit tests.
Richard Smith [Tue, 21 Aug 2012 20:39:25 +0000 (20:39 +0000)]
Don't pass a null pointer to cast<> in its unit tests.

llvm-svn: 162310

9 years agoDon't bind a reference to a dereferenced null pointer (for return value of WeakVH...
Richard Smith [Tue, 21 Aug 2012 20:35:14 +0000 (20:35 +0000)]
Don't bind a reference to a dereferenced null pointer (for return value of WeakVH::operator*).

llvm-svn: 162309

9 years agoComment change.
Johnny Chen [Tue, 21 Aug 2012 20:18:21 +0000 (20:18 +0000)]
Comment change.

llvm-svn: 162308

9 years ago[ms-inline asm] Do not report a Parser error when matching inline assembly.
Chad Rosier [Tue, 21 Aug 2012 19:37:55 +0000 (19:37 +0000)]
[ms-inline asm] Do not report a Parser error when matching inline assembly.

llvm-svn: 162307

9 years ago[ms-inline asm] Do not report a Parser error when matching inline assembly.
Chad Rosier [Tue, 21 Aug 2012 19:36:59 +0000 (19:36 +0000)]
[ms-inline asm] Do not report a Parser error when matching inline assembly.

llvm-svn: 162306

9 years agoIgnore the documentation-suggested location for compile_commands.json
David Blaikie [Tue, 21 Aug 2012 19:23:30 +0000 (19:23 +0000)]
Ignore the documentation-suggested location for compile_commands.json

According to http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html
it's suggested that compile_commands.json in the root of the LLVM source tree
should be a symlink to the json file produced by your build system of choice.

So here's a patch so it doesn't turn up in git status, etc.

llvm-svn: 162305

9 years agoThe presence of the empty file "foo" unfortunately does not improve LLVM in any way.
David Blaikie [Tue, 21 Aug 2012 19:13:12 +0000 (19:13 +0000)]
The presence of the empty file "foo" unfortunately does not improve LLVM in any way.

Thanks to Duncan Sands for catching this random file in code review.

llvm-svn: 162304

9 years agoModern objc translator: Fixes a crash in rewriter when rewriting the API
Fariborz Jahanian [Tue, 21 Aug 2012 18:56:50 +0000 (18:56 +0000)]
Modern objc translator: Fixes a crash in rewriter when rewriting the API
for structure valued method messaging. // rdar://12142241

llvm-svn: 162303

9 years agoUse LLVM_BUILTIN_TRAP instead of lame volatile int traps.
David Blaikie [Tue, 21 Aug 2012 18:56:49 +0000 (18:56 +0000)]
Use LLVM_BUILTIN_TRAP instead of lame volatile int traps.

(from a todo mentioned in r159469 & originally suggested by Chandler Carruth)

llvm-svn: 162302

9 years agoRemove unnecessary cast that was also unnecessarily casting away constness.
David Blaikie [Tue, 21 Aug 2012 18:54:23 +0000 (18:54 +0000)]
Remove unnecessary cast that was also unnecessarily casting away constness.

Even looking at the revision history I couldn't quite piece together why this
cast was ever written in the first place, but I assume it was because of some
change in the inheritance, perhaps this function was reimplemented in a
derived type & this caller was meant to get the base version (& it wasn't

llvm-svn: 162301

9 years agoProvide a portability macro for __builtin_trap.
David Blaikie [Tue, 21 Aug 2012 18:54:21 +0000 (18:54 +0000)]
Provide a portability macro for __builtin_trap.

llvm-svn: 162300

9 years agoReduce the amount of state in the Option class by relying on the data from OptTable...
Michael J. Spencer [Tue, 21 Aug 2012 18:51:17 +0000 (18:51 +0000)]
Reduce the amount of state in the Option class by relying on the data from OptTable::Info.

llvm-svn: 162299

9 years agoFix macros arguments with an underscore, dot or dollar in them. This is based
Rafael Espindola [Tue, 21 Aug 2012 18:29:30 +0000 (18:29 +0000)]
Fix macros arguments with an underscore, dot or dollar in them. This is based
on a patch by Andy/PaX. I added the support for dot and dollar.

llvm-svn: 162298

9 years agoSwitch some realignment calculations over to llvm::RoundUpToAlignment.
Richard Smith [Tue, 21 Aug 2012 18:18:06 +0000 (18:18 +0000)]
Switch some realignment calculations over to llvm::RoundUpToAlignment.

llvm-svn: 162297

9 years ago[ms-inline asm] Expose the ErrorInfo from the MatchInstructionImpl. In general,
Chad Rosier [Tue, 21 Aug 2012 18:15:08 +0000 (18:15 +0000)]
[ms-inline asm] Expose the ErrorInfo from the MatchInstructionImpl.  In general,
this is the index of the operand that failed to match.

llvm-svn: 162296

9 years ago[ms-inline asm] Expose the ErrorInfo from the MatchInstructionImpl. In general,
Chad Rosier [Tue, 21 Aug 2012 18:14:59 +0000 (18:14 +0000)]
[ms-inline asm] Expose the ErrorInfo from the MatchInstructionImpl.  In general,
this is the index of the operand that failed to match.

Note: This may cause a buildbot failure due to an API mismatch in clang.  Should
recover with my next commit to clang.

llvm-svn: 162295

9 years agoDeclPrinter, terse mode: don't print function bodies
Dmitri Gribenko [Tue, 21 Aug 2012 17:47:24 +0000 (17:47 +0000)]
DeclPrinter, terse mode: don't print function bodies

llvm-svn: 162294

9 years agoRename PrintingPolicy::DontRecurseInDeclContext to PrintingPolicy::TerseOutput
Dmitri Gribenko [Tue, 21 Aug 2012 17:36:32 +0000 (17:36 +0000)]
Rename PrintingPolicy::DontRecurseInDeclContext to PrintingPolicy::TerseOutput
to reflect the intention, not the implementation.

llvm-svn: 162293

9 years agoFormatting. No functional change.
Chad Rosier [Tue, 21 Aug 2012 17:22:47 +0000 (17:22 +0000)]
Formatting.  No functional change.

llvm-svn: 162292

9 years agoMake the wording in of the "expected identifier" error in the .macro directive
Rafael Espindola [Tue, 21 Aug 2012 17:12:05 +0000 (17:12 +0000)]
Make the wording in of the "expected identifier" error in the .macro directive
consistent with the other "expected identifier" errors.
Extracted from the Andy/PaX patch. I added the test.

llvm-svn: 162291

9 years ago[ms-inline asm] Append identifier for better debugging.
Chad Rosier [Tue, 21 Aug 2012 17:02:27 +0000 (17:02 +0000)]
[ms-inline asm] Append identifier for better debugging.

llvm-svn: 162289

9 years ago[ms-inline asm] Remove this test case and the associated special case code.
Chad Rosier [Tue, 21 Aug 2012 17:01:26 +0000 (17:01 +0000)]
[ms-inline asm] Remove this test case and the associated special case code.

llvm-svn: 162288

9 years agoMake Mr. Pedantic happy by fixing banner to be exactly 80 columns
Marshall Clow [Tue, 21 Aug 2012 16:29:41 +0000 (16:29 +0000)]
Make Mr. Pedantic happy by fixing banner to be exactly 80 columns

llvm-svn: 162287

9 years agoPacify PVS-Studio by changing the type rather than doing a cast, a tweak
Duncan Sands [Tue, 21 Aug 2012 16:20:37 +0000 (16:20 +0000)]
Pacify PVS-Studio by changing the type rather than doing a cast, a tweak
suggested by David Blaikie.

llvm-svn: 162286

9 years ago[driver] Add support for the --param ssp-buffer-size= driver option.
Chad Rosier [Tue, 21 Aug 2012 16:16:06 +0000 (16:16 +0000)]
[driver] Add support for the --param ssp-buffer-size= driver option.

llvm-svn: 162285

9 years agoAdd support for the --param ssp-buffer-size= driver option.
Chad Rosier [Tue, 21 Aug 2012 16:15:24 +0000 (16:15 +0000)]
Add support for the --param ssp-buffer-size= driver option.

llvm-svn: 162284