9 years agoAdd Hyeon-bin Jeong to CREDITS.TXT
Howard Hinnant [Fri, 24 Aug 2012 21:45:19 +0000 (21:45 +0000)]
Add Hyeon-bin Jeong to CREDITS.TXT

llvm-svn: 162604

9 years agoExplicitly mark LEApcrel pseudos with hasSideEffects.
Jakob Stoklund Olesen [Fri, 24 Aug 2012 21:44:11 +0000 (21:44 +0000)]
Explicitly mark LEApcrel pseudos with hasSideEffects.

It's not clear that they should be marked as such, but tbb formation
fails if t2LEApcrelJT is hoisted of of a loop.

This doesn't change the flags on these instructions,
UnmodeledSideEffects was already inferred from the missing pattern.

llvm-svn: 162603

9 years ago[ms-inline asm] Change the -fenable-experimental-ms-inline-asm option from a
Chad Rosier [Fri, 24 Aug 2012 21:42:51 +0000 (21:42 +0000)]
[ms-inline asm] Change the -fenable-experimental-ms-inline-asm option from a
CodeGen option to a LangOpt option.  In turn, hoist the guard into the parser
so that we avoid the new (and fairly unstable) Sema/AST/CodeGen logic.  This
should restore the behavior of clang to that prior to r158325.

llvm-svn: 162602

9 years agoHyeon-Bin Jeong: 1. sync() should reset it’s external buffer pointers.
Howard Hinnant [Fri, 24 Aug 2012 21:20:56 +0000 (21:20 +0000)]
Hyeon-Bin Jeong: 1. sync() should reset it’s external buffer pointers.
Remaining characters should be discarded once sync() called. If don’t, garbage
characters can be inserted to the front of external buffer in underflow().
Because underflow() copies remaining characters in external buffer to it’s
front. This results wrong characters insertion when seekpos() or seekoff() is

this line should be inserted in sync() just before return:
__extbufnext_ = __extbufend_ = __extbuf_;

2. sync() should use length() rather than out() to calculate offset.
Reversing iterators and calling out() to calculate offset from behind is
working fine in stateless character encoding. However, in stateful encoding,
escape sequences could differ in length. As a result, out() could return wrong

For example, if we have internal buffer converted from this external sequence:
(capital letters mean escape sequence)
… a a a a B b b b b

out() produces this sequence.
b b b b A a a a a

Because out() inserts escape sequence A rather than B, result sequence doesn't
match to external sequence. A and B could have different lengths, result offset
could be wrong value too.

length() method in codecvt is right for calculating offset, but it counts
offset from the beginning of buffer. So it requires another state member
variable to hold state before conversion.
Fixes http://llvm.org/bugs/show_bug.cgi?id=13667

llvm-svn: 162601

9 years agoProviding an additional Python command example
Enrico Granata [Fri, 24 Aug 2012 21:20:14 +0000 (21:20 +0000)]
Providing an additional Python command example

llvm-svn: 162600

9 years agoStop inferring isVariadic from instruction patterns.
Jakob Stoklund Olesen [Fri, 24 Aug 2012 21:08:09 +0000 (21:08 +0000)]
Stop inferring isVariadic from instruction patterns.

Instructions are now only marked as variadic if they use variable_ops in
their ins list.

A variadic SDNode is typically used for call nodes that have the call
arguments as operands.

A variadic MachineInstr can actually encode a variable number of
operands, for example ARM's stm/ldm instructions. A call instruction
does not have to be variadic. The call argument registers are added as
implicit operands.

This change remove the MCID::Variadic flags from most call and return
instructions, allowing us to better verify their operands.

llvm-svn: 162599

9 years ago[analyzer] Ted fixed the plist-html issue, so the assert can go away.
Anna Zaks [Fri, 24 Aug 2012 21:07:49 +0000 (21:07 +0000)]
[analyzer] Ted fixed the plist-html issue, so the assert can go away.

llvm-svn: 162598

9 years ago[analyzer] More fixups/rewording based on Jordan's feedback.
Anna Zaks [Fri, 24 Aug 2012 21:07:45 +0000 (21:07 +0000)]
[analyzer] More fixups/rewording based on Jordan's feedback.

llvm-svn: 162597

9 years agoFix call instruction operands in ARMFastISel.
Jakob Stoklund Olesen [Fri, 24 Aug 2012 20:52:46 +0000 (20:52 +0000)]
Fix call instruction operands in ARMFastISel.

The ARM BL and BLX instructions don't have predicate operands, but the
thumb variants tBL and tBLX do.

The argument registers should be added as implicit uses.

llvm-svn: 162593

9 years agoMark X86::RET and RETI instructions as variadic.
Jakob Stoklund Olesen [Fri, 24 Aug 2012 20:52:44 +0000 (20:52 +0000)]
Mark X86::RET and RETI instructions as variadic.

There is special magic happening when returning floating point values on
the x87 stack. The RET instructions get extra f80 operands.

llvm-svn: 162592

9 years agoAvoid including explicit uses when counting SDNode imp-uses.
Jakob Stoklund Olesen [Fri, 24 Aug 2012 20:52:42 +0000 (20:52 +0000)]
Avoid including explicit uses when counting SDNode imp-uses.

It is legal to have a register node as an explicit operand, it shouldn't
be counted as an implicit use.

llvm-svn: 162591

9 years agoRemove unnecessary calls to c_str.
Benjamin Kramer [Fri, 24 Aug 2012 20:43:21 +0000 (20:43 +0000)]
Remove unnecessary calls to c_str.

llvm-svn: 162590

9 years agoDisable Mips' delay slot filler when optimization level is O0.
Akira Hatanaka [Fri, 24 Aug 2012 20:40:15 +0000 (20:40 +0000)]
Disable Mips' delay slot filler when optimization level is O0.

llvm-svn: 162589

9 years agoFix analyzer tests.
Ted Kremenek [Fri, 24 Aug 2012 20:39:55 +0000 (20:39 +0000)]
Fix analyzer tests.

llvm-svn: 162588

9 years agoRevert "Go ahead and show experimental checkers in the scan-build "-h" output."
Ted Kremenek [Fri, 24 Aug 2012 20:39:38 +0000 (20:39 +0000)]
Revert "Go ahead and show experimental checkers in the scan-build "-h" output."

llvm-svn: 162587

9 years agoInstantiate class template specializations during ADL.
John McCall [Fri, 24 Aug 2012 20:38:34 +0000 (20:38 +0000)]
Instantiate class template specializations during ADL.

llvm-svn: 162586

9 years agoFix basic_filebuf's internal buffer is shrinking when using with some codecvt. http...
Howard Hinnant [Fri, 24 Aug 2012 20:37:00 +0000 (20:37 +0000)]
Fix basic_filebuf's internal buffer is shrinking when using with some codecvt.  llvm.org/bugs/show_bug.cgi?id=13602

llvm-svn: 162585

9 years agoIn MipsDAGToDAGISel::SelectAddr, fold add node into address operand, if its
Akira Hatanaka [Fri, 24 Aug 2012 20:21:49 +0000 (20:21 +0000)]
In MipsDAGToDAGISel::SelectAddr, fold add node into address operand, if its
second operand is MipsISD::GPRel.

llvm-svn: 162584

9 years agoobjective-C: When checking for valid overriden property
Fariborz Jahanian [Fri, 24 Aug 2012 20:10:53 +0000 (20:10 +0000)]
objective-C: When checking for valid overriden property
in class extension, assume default is rewdwrite and don't
issue any diagnostics, privided other ownership models
are ok.

llvm-svn: 162583

9 years agoRename the "experimental" checker package to "alpha". We will then refine
Ted Kremenek [Fri, 24 Aug 2012 19:46:03 +0000 (19:46 +0000)]
Rename the "experimental" checker package to "alpha".  We will then refine
this group into "alpha" and "beta" to distinguish between checkers in
different levels of premature state.

llvm-svn: 162582

9 years agoRework how PathDiagnosticConsumers pass knowledge of what files they
Ted Kremenek [Fri, 24 Aug 2012 19:35:19 +0000 (19:35 +0000)]
Rework how PathDiagnosticConsumers pass knowledge of what files they
generated for a given diagnostic to another.  Because PathDiagnostics
are specific to a give PathDiagnosticConsumer, store in
a FoldingSet a unique hash for a PathDiagnostic (that will be the same
for the same bug for different PathDiagnosticConsumers) that
stores a list of files generated.  This can then be read by the
other PathDiagnosticConsumers.

This fixes breakage in the PLIST-HTML output.

llvm-svn: 162580

9 years ago[analyzer] Address Jordan's review comments.
Anna Zaks [Fri, 24 Aug 2012 18:43:09 +0000 (18:43 +0000)]
[analyzer] Address Jordan's review comments.

llvm-svn: 162579

9 years agoForgot to check in ProfileDataTypes.h in r162576
Manman Ren [Fri, 24 Aug 2012 18:40:00 +0000 (18:40 +0000)]
Forgot to check in ProfileDataTypes.h in r162576

llvm-svn: 162578

9 years agoProfile: move a single enum out of ProfileInfoTypes.h into a new
Manman Ren [Fri, 24 Aug 2012 18:31:44 +0000 (18:31 +0000)]
Profile: move a single enum out of ProfileInfoTypes.h into a new
ProfileDataTypes.h header.

With this patch the old and new profiling code can exist side-by-side. The new
profiling code will be submitted soon and it only supports insert-edge-profiling
for now and will not depend on ProfileInfo.

Patch by Alastair Murray.

llvm-svn: 162576

9 years agoFix 80-column violation.
Chad Rosier [Fri, 24 Aug 2012 18:31:16 +0000 (18:31 +0000)]
Fix 80-column violation.

llvm-svn: 162575

9 years agoChanged register ValueObjects to report their
Sean Callanan [Fri, 24 Aug 2012 18:21:05 +0000 (18:21 +0000)]
Changed register ValueObjects to report their
expression path in a way that can actually be
resolved by "expr".

llvm-svn: 162574

9 years agordar://problem/11811338
Johnny Chen [Fri, 24 Aug 2012 18:15:45 +0000 (18:15 +0000)]

Add 'attach <pid>|<process-name>' command to lldb, as well as 'detach' which is an alias of 'process detach'.
Add two completion test cases for "attach" and "detach".

llvm-svn: 162573

9 years agoBranchProb: modify the definition of an edge in BranchProbabilityInfo to handle
Manman Ren [Fri, 24 Aug 2012 18:14:27 +0000 (18:14 +0000)]
BranchProb: modify the definition of an edge in BranchProbabilityInfo to handle
the case of multiple edges from one block to another.

A simple example is a switch statement with multiple values to the same
destination. The definition of an edge is modified from a pair of blocks to
a pair of PredBlock and an index into the successors.

Also set the weight correctly when building SelectionDAG from LLVM IR,
especially when converting a Switch.
IntegersSubsetMapping is updated to calculate the weight for each cluster.

llvm-svn: 162572

9 years agoFixed order of calling use_facet vs setbuf in basic_filebuf default constructor.
Howard Hinnant [Fri, 24 Aug 2012 18:06:47 +0000 (18:06 +0000)]
Fixed order of calling use_facet vs setbuf in basic_filebuf default constructor.

llvm-svn: 162571

9 years agoComment diagnostics: for unresolved parameters, do not suggest parameter fixit
Dmitri Gribenko [Fri, 24 Aug 2012 17:45:39 +0000 (17:45 +0000)]
Comment diagnostics: for unresolved parameters, do not suggest parameter fixit
with parameter that is documented.

Fixes PR13670, <rdar://problem/12155840>.

llvm-svn: 162570

9 years agoVerify explicit instruction properties when they can be inferred.
Jakob Stoklund Olesen [Fri, 24 Aug 2012 17:08:41 +0000 (17:08 +0000)]
Verify explicit instruction properties when they can be inferred.

It is now allowed to explicitly set hasSideEffects, mayStore, and
mayLoad on instructions with patterns.

Verify that the patterns are consistent with the explicit flags.

llvm-svn: 162569

9 years ago[ms-inline asm] Refactor code. No functional change intended.
Chad Rosier [Fri, 24 Aug 2012 17:05:45 +0000 (17:05 +0000)]
[ms-inline asm] Refactor code.  No functional change intended.

llvm-svn: 162568

9 years agobasic_filebuf needs to delay obtaining a codecvt facet from the global locale to...
Howard Hinnant [Fri, 24 Aug 2012 16:52:47 +0000 (16:52 +0000)]
basic_filebuf needs to delay obtaining a codecvt facet from the global locale to give the client a chance to imbue the proper locale.  Fixes llvm.org/bugs/show_bug.cgi?id=13663.

llvm-svn: 162567

9 years ago[asan/tsan] rename FunctionBlackList* to BlackList* as this class is not limited...
Kostya Serebryany [Fri, 24 Aug 2012 16:44:47 +0000 (16:44 +0000)]
[asan/tsan] rename FunctionBlackList* to BlackList* as this class is not limited to functions any more

llvm-svn: 162566

9 years ago[asan/tsan] extend the functionality of FunctionBlackList to globals and modules...
Kostya Serebryany [Fri, 24 Aug 2012 16:40:11 +0000 (16:40 +0000)]
[asan/tsan] extend the functionality of FunctionBlackList to globals and modules. Patch by Reid Watson.

llvm-svn: 162565

9 years ago[ms-inline asm] Generate the Input/Output expressions using
Chad Rosier [Fri, 24 Aug 2012 16:38:58 +0000 (16:38 +0000)]
[ms-inline asm] Generate the Input/Output expressions using

llvm-svn: 162564

9 years ago[analyzer] If we dereference a NULL that came from a function, show the return.
Jordan Rose [Fri, 24 Aug 2012 16:34:31 +0000 (16:34 +0000)]
[analyzer] If we dereference a NULL that came from a function, show the return.

More generally, any time we try to track where a null value came from, we
should show if it came from a function. This usually isn't necessary if
the value is symbolic, but if the value is just a constant we previously
just ignored its origin entirely. Now, we'll step into the function and
recursively add a visitor to the returned expression.


llvm-svn: 162563

9 years agoLower constant pools and jump tables via TOC on PPC64/SVR4.
Roman Divacky [Fri, 24 Aug 2012 16:26:02 +0000 (16:26 +0000)]
Lower constant pools and jump tables via TOC on PPC64/SVR4.

In collaboration with Adhemerval Zanella.

llvm-svn: 162562

9 years agotsan: improve memory allocator a bit
Dmitry Vyukov [Fri, 24 Aug 2012 15:53:14 +0000 (15:53 +0000)]
tsan: improve memory allocator a bit

llvm-svn: 162561

9 years agoFix 80-column violation.
Chad Rosier [Fri, 24 Aug 2012 15:51:10 +0000 (15:51 +0000)]
Fix 80-column violation.

llvm-svn: 162560

9 years agoGVN: Fix quadratic runtime on the number of switch cases.
Benjamin Kramer [Fri, 24 Aug 2012 15:06:28 +0000 (15:06 +0000)]
GVN: Fix quadratic runtime on the number of switch cases.

No intended behavior change.  This was introduced in r162023.  With the fixed
algorithm a Release build of ARMInstPrinter.cpp goes from 16s to 10s on a
2011 MBP.

llvm-svn: 162559

9 years agoFix load/store SDNode flags.
Jakob Stoklund Olesen [Fri, 24 Aug 2012 14:43:30 +0000 (14:43 +0000)]
Fix load/store SDNode flags.

llvm-svn: 162558

9 years agoAdd missing SDNPSideEffect flags.
Jakob Stoklund Olesen [Fri, 24 Aug 2012 14:43:27 +0000 (14:43 +0000)]
Add missing SDNPSideEffect flags.

llvm-svn: 162557

9 years agoRemove more mayLoad workarounds.
Jakob Stoklund Olesen [Fri, 24 Aug 2012 14:43:22 +0000 (14:43 +0000)]
Remove more mayLoad workarounds.

llvm-svn: 162556

9 years agoPoCC: Simplify condition
Tobias Grosser [Fri, 24 Aug 2012 13:56:56 +0000 (13:56 +0000)]
PoCC: Simplify condition

llvm-svn: 162555

9 years agoSort includes
Tobias Grosser [Fri, 24 Aug 2012 13:54:40 +0000 (13:54 +0000)]
Sort includes

llvm-svn: 162554

9 years agoPoCC: Adapt to earlier vectorizer changes
Tobias Grosser [Fri, 24 Aug 2012 13:54:36 +0000 (13:54 +0000)]
PoCC: Adapt to earlier vectorizer changes

llvm-svn: 162553

9 years agoPush ArrayRef through the Expr hierarchy.
Benjamin Kramer [Fri, 24 Aug 2012 11:54:20 +0000 (11:54 +0000)]
Push ArrayRef through the Expr hierarchy.

No functionality change.

llvm-svn: 162552

9 years agoFix the definition of JSONAnchorSource. MSVC mangles variable symbols, and "volatile...
NAKAMURA Takumi [Fri, 24 Aug 2012 10:39:28 +0000 (10:39 +0000)]
Fix the definition of JSONAnchorSource. MSVC mangles variable symbols, and "volatile" affects.

llvm-svn: 162550

9 years agoTry to appease MSVC even more elaborately in the alignment hacking space.
Chandler Carruth [Fri, 24 Aug 2012 09:53:43 +0000 (09:53 +0000)]
Try to appease MSVC even more elaborately in the alignment hacking space.

MSVC doesn't support passing by-value parameters with alignment of
16-bytes or higher apparantly. What is deeply confusing is that it seems
to *sometimes* (but not always) apply this to any type whose alignment
is set using __declspec(align(...)). This caused lots of errors when we switch
SmallVector over to use the automatically aligned character array
utilities as they used __declspec(align(...)) heavily.

As a pretty horrible but effective work-around, we instead cherry pick
the smallest alignment sizes with specific types that happen to have the
correct alignment, and then fall back to the attribute solution past
them. This should resolve the MSVC build errors folks have been hitting.
Sorry for that. In good news, it will do this without introducing other
UB I hope. =]

Thanks to Timur Iskhodzhanov for helping me test this!

llvm-svn: 162549

9 years agoRevert the erroneous changes made to Makefile.old in r162547
Alexander Potapenko [Fri, 24 Aug 2012 09:31:53 +0000 (09:31 +0000)]
Revert the erroneous changes made to Makefile.old in r162547
Remove a spare newline from asan_rtl.cc

llvm-svn: 162548

9 years agoIf the program is linked to a dynamic ASan runtime which is not present in DYLD_INSER...
Alexander Potapenko [Fri, 24 Aug 2012 09:22:05 +0000 (09:22 +0000)]
If the program is linked to a dynamic ASan runtime which is not present in DYLD_INSERT_LIBRARIES
(which, in turn, is required for our interceptors to take effect), re-exec the program with

llvm-svn: 162547

9 years agoAdd add_clang_runtime_shared_library() CMake function and use it to put the shared...
Alexander Potapenko [Fri, 24 Aug 2012 07:49:22 +0000 (07:49 +0000)]
Add add_clang_runtime_shared_library() CMake function and use it to put the shared ASan runtime in the appropriate place.

llvm-svn: 162546

9 years agoTeach CFG that 'if (x & 0)' and 'if (x * 0)' is an unfeasible branch.
Ted Kremenek [Fri, 24 Aug 2012 07:42:09 +0000 (07:42 +0000)]
Teach CFG that 'if (x & 0)' and 'if (x * 0)' is an unfeasible branch.

Fixes <rdar://problem/11005770>.

llvm-svn: 162545

9 years agoAllow RecursiveASTVisitor to visit CXXCtorInitializer objects for which
James Dennett [Fri, 24 Aug 2012 06:59:51 +0000 (06:59 +0000)]
Allow RecursiveASTVisitor to visit CXXCtorInitializer objects for which
isWritten() returns false, if shouldVisitImplicitCode() returns true.
Previously those CXXCtorInitializers were always skipped.

In order to make this change easier to test, this patch also extends the
test class template ExpectedLocationVisitor to support arbitrary numbers
of expected matches and disallowed matches.

llvm-svn: 162544

9 years agoGo ahead and show experimental checkers in the scan-build "-h" output.
Ted Kremenek [Fri, 24 Aug 2012 06:49:34 +0000 (06:49 +0000)]
Go ahead and show experimental checkers in the scan-build "-h" output.
They are labeled as not being enabled-by-default, and how else
are users going to test them.

Fixes <rdar://problem/11654923>

llvm-svn: 162543

9 years agoRemove printf that go left in the code.
Greg Clayton [Fri, 24 Aug 2012 06:43:15 +0000 (06:43 +0000)]
Remove printf that go left in the code.

llvm-svn: 162542

9 years agoUse LLVM's plugin registry to enable registering new compilation
Daniel Jasper [Fri, 24 Aug 2012 05:50:27 +0000 (05:50 +0000)]
Use LLVM's plugin registry to enable registering new compilation
databases. Move JSONCompilationDatabase.h to its own files and
register it as plugin.

llvm-svn: 162541

9 years agoThe OS plug-in can now get data from a python script that implements the protocol.
Greg Clayton [Fri, 24 Aug 2012 05:45:15 +0000 (05:45 +0000)]
The OS plug-in can now get data from a python script that implements the protocol.

llvm-svn: 162540

9 years agoChange AST matcher names to conform with the new naming.
Daniel Jasper [Fri, 24 Aug 2012 05:39:51 +0000 (05:39 +0000)]
Change AST matcher names to conform with the new naming.

llvm-svn: 162539

9 years agoRename the ASTMatchers to better match AST nodes. Now, all
Daniel Jasper [Fri, 24 Aug 2012 05:12:34 +0000 (05:12 +0000)]
Rename the ASTMatchers to better match AST nodes. Now, all
ASTMatchers have the same name as the corresponding AST nodes
but are lower case. The only exceptions are the "CXX" prefixes
which are not copied over to the matcher names as the goal is to
actually remove these prefixes from the AST node names.

llvm-svn: 162536

9 years agoOn OS X, use xcrun (if present) to find the clang to use for static analysis if
Ted Kremenek [Fri, 24 Aug 2012 04:53:06 +0000 (04:53 +0000)]
On OS X, use xcrun (if present) to find the clang to use for static analysis if
no clang can be found relative to the location of scan-build.

Fixes <rdar://problem/11691794>

llvm-svn: 162535

9 years agoCustom lower FMA intrinsics to target specific nodes and remove the patterns.
Craig Topper [Fri, 24 Aug 2012 04:03:22 +0000 (04:03 +0000)]
Custom lower FMA intrinsics to target specific nodes and remove the patterns.

llvm-svn: 162534

9 years ago[analyzer] Fix realloc related bug in the malloc checker.
Anna Zaks [Fri, 24 Aug 2012 02:28:20 +0000 (02:28 +0000)]
[analyzer] Fix realloc related bug in the malloc checker.

When reallocation of a non-allocated (not owned) symbol fails do not
expect it to be freed.

llvm-svn: 162533

9 years agoWe have a partially working OS plug-in through python!
Greg Clayton [Fri, 24 Aug 2012 02:01:39 +0000 (02:01 +0000)]
We have a partially working OS plug-in through python!

llvm-svn: 162532

9 years agoFixing an issue in the OS sample
Enrico Granata [Fri, 24 Aug 2012 01:53:47 +0000 (01:53 +0000)]
Fixing an issue in the OS sample

llvm-svn: 162531

9 years agoAdded Args::StringForEncoding(), Args::StringToGenericRegister() and centralized...
Greg Clayton [Fri, 24 Aug 2012 01:42:50 +0000 (01:42 +0000)]
Added Args::StringForEncoding(), Args::StringToGenericRegister() and centralized the parsing of the string to encoding and string to generic register.

Added code the initialize the register context in the OperatingSystemPython plug-in with the new PythonData classes, and added a test OperatingSystemPython module in lldb/examples/python/operating_system.py that we can use for testing.

llvm-svn: 162530

9 years ago[analyzer] Remove unnecessary code.
Anna Zaks [Fri, 24 Aug 2012 01:39:13 +0000 (01:39 +0000)]
[analyzer] Remove unnecessary code.

This code has been added a while ago and removing it does not trigger
any test failures. The false positives it was trying to suppress are
probably handled by other logic (ex: special handling of delegates).

llvm-svn: 162529

9 years ago[analyzer] Move DynamicTypeInfo out of the ProgramState.h
Anna Zaks [Fri, 24 Aug 2012 01:39:10 +0000 (01:39 +0000)]
[analyzer] Move DynamicTypeInfo out of the ProgramState.h

(I am not sure if we should move the setters and getters as well and
make them into static methods..)

llvm-svn: 162528

9 years agoFixing a bunch of issues with the OS plugin code
Enrico Granata [Fri, 24 Aug 2012 01:34:39 +0000 (01:34 +0000)]
Fixing a bunch of issues with the OS plugin code

llvm-svn: 162527

9 years agoUse DW_FORM_flag_present to save space in debug information if we're
Eric Christopher [Fri, 24 Aug 2012 01:14:27 +0000 (01:14 +0000)]
Use DW_FORM_flag_present to save space in debug information if we're
not in darwin gdb compat mode.

Fixes rdar://10975088

llvm-svn: 162526

9 years agoAdd support for some missing DW_FORM_*.
Eric Christopher [Fri, 24 Aug 2012 01:14:23 +0000 (01:14 +0000)]
Add support for some missing DW_FORM_*.

TODO: Fix code duplication and coding style.
llvm-svn: 162525

9 years agoFormatting.
Eric Christopher [Fri, 24 Aug 2012 01:14:21 +0000 (01:14 +0000)]

llvm-svn: 162524

9 years agoNew -fcatch-undefined-behavior features:
Richard Smith [Fri, 24 Aug 2012 00:54:33 +0000 (00:54 +0000)]
New -fcatch-undefined-behavior features:
 * when checking that a pointer or reference refers to appropriate storage for a type, also check the alignment and perform a null check
 * check that references are bound to appropriate storage
 * check that 'this' has appropriate storage in member accesses and member function calls

llvm-svn: 162523

9 years agoHooking up two more calls for the PythonOSPlugin stuff. The part of code to fetch...
Enrico Granata [Fri, 24 Aug 2012 00:51:29 +0000 (00:51 +0000)]
Hooking up two more calls for the PythonOSPlugin stuff. The part of code to fetch the data and convert it to C++ objects is still missing, but will come

llvm-svn: 162522

9 years agoUpdated LibTooling.html, minor improvements in CommonOptionsParser
Alexander Kornienko [Fri, 24 Aug 2012 00:39:14 +0000 (00:39 +0000)]
Updated LibTooling.html, minor improvements in CommonOptionsParser

llvm-svn: 162521

9 years agoFix undefined behavior (negation of INT_MIN) in ARM backend.
Richard Smith [Fri, 24 Aug 2012 00:35:46 +0000 (00:35 +0000)]
Fix undefined behavior (negation of INT_MIN) in ARM backend.

llvm-svn: 162520

9 years agoWas forcing everyone on ToT to use the PythonOSPlugin.. my bad
Enrico Granata [Fri, 24 Aug 2012 00:32:51 +0000 (00:32 +0000)]
Was forcing everyone on ToT to use the PythonOSPlugin.. my bad

llvm-svn: 162519

9 years agoFix floating-point divide by zero, in a case where the value was not going to be...
Richard Smith [Fri, 24 Aug 2012 00:31:45 +0000 (00:31 +0000)]
Fix floating-point divide by zero, in a case where the value was not going to be used anyway.

llvm-svn: 162518

9 years agoRemove some spurious mayLoad = 0 flags.
Jakob Stoklund Olesen [Fri, 24 Aug 2012 00:31:20 +0000 (00:31 +0000)]
Remove some spurious mayLoad = 0 flags.

They were inserted to silence TableGen's warning about
redundant properties. That warning is now gone.

llvm-svn: 162517

9 years agoHeed guessInstructionProperties, and stop warning on redundant flags.
Jakob Stoklund Olesen [Fri, 24 Aug 2012 00:31:16 +0000 (00:31 +0000)]
Heed guessInstructionProperties, and stop warning on redundant flags.

Emit TableGen errors if guessInstructionProperties is 0 and
instruction properties can't be inferred from patterns.

Allow explicit instruction properties even when they can be inferred.

This patch doesn't change the TableGen output. Redundant properties
are not yet verified because the tree has errors.

llvm-svn: 162516

9 years agoAdd missing SDNP properties on the flushw node.
Jakob Stoklund Olesen [Fri, 24 Aug 2012 00:31:13 +0000 (00:31 +0000)]
Add missing SDNP properties on the flushw node.

llvm-svn: 162515

9 years agoX86MemBarrier has unmodeled side effects.
Jakob Stoklund Olesen [Fri, 24 Aug 2012 00:31:10 +0000 (00:31 +0000)]
X86MemBarrier has unmodeled side effects.

llvm-svn: 162514

9 years agoAdding bindings to the Script Interpreter for some basic Python OS plugin functionali...
Enrico Granata [Fri, 24 Aug 2012 00:30:47 +0000 (00:30 +0000)]
Adding bindings to the Script Interpreter for some basic Python OS plugin functionality (still WIP)

llvm-svn: 162513

9 years agoDeclPrinter tests: mark test case we get wrong currently with WRONG.
Dmitri Gribenko [Fri, 24 Aug 2012 00:27:50 +0000 (00:27 +0000)]
DeclPrinter tests: mark test case we get wrong currently with WRONG.

llvm-svn: 162512

9 years agoDeclPrinter tests: add two more tests.
Dmitri Gribenko [Fri, 24 Aug 2012 00:26:25 +0000 (00:26 +0000)]
DeclPrinter tests: add two more tests.

llvm-svn: 162511

9 years agoFix a typo.
Johnny Chen [Fri, 24 Aug 2012 00:11:29 +0000 (00:11 +0000)]
Fix a typo.

llvm-svn: 162510

9 years ago[ms-inline asm] Add the basic APIs for Exprs to the MSAsmStmt AST. Next we need
Chad Rosier [Fri, 24 Aug 2012 00:07:09 +0000 (00:07 +0000)]
[ms-inline asm] Add the basic APIs for Exprs to the MSAsmStmt AST.  Next we need
generate the Input/Output expressions using Sema::ActOnIdExpression().

llvm-svn: 162509

9 years ago[analyzer] Make analyzer less aggressive when dealing with [self init].
Anna Zaks [Fri, 24 Aug 2012 00:06:12 +0000 (00:06 +0000)]
[analyzer] Make analyzer less aggressive when dealing with [self init].

With inlining, retain count checker starts tracking 'self' through the
init methods. The analyser results were too noisy if the developer
did not follow 'self = [super init]' pattern (which is common
especially in older code bases) - we reported self init anti-pattern AND
possible use-after-free. This patch teaches the retain count
checker to assume that [super init] does not fail when it's not consumed
by another expression. This silences the retain count warning that warns
about possibility of use-after-free when init fails, while preserving
all the other checking on 'self'.

llvm-svn: 162508

9 years agoComment semantic analysis: treat function typedefs as functions so that one can
Dmitri Gribenko [Fri, 24 Aug 2012 00:05:30 +0000 (00:05 +0000)]
Comment semantic analysis: treat function typedefs as functions so that one can
use \param and \returns in documentation.

Fixes PR13533.

llvm-svn: 162507

9 years agoFix a few -Wdocumentation warnings.
Dmitri Gribenko [Fri, 24 Aug 2012 00:01:24 +0000 (00:01 +0000)]
Fix a few -Wdocumentation warnings.

llvm-svn: 162506

9 years agoFix undefined behavior (signed integer overflow) when Clang parses a hexfloat with...
Richard Smith [Fri, 24 Aug 2012 00:01:19 +0000 (00:01 +0000)]
Fix undefined behavior (signed integer overflow) when Clang parses a hexfloat with an enormous exponent. Caught by an existing unit test + -ftrapv.

llvm-svn: 162505

9 years agoSwitch over to using object instances for all PythonData objects.
Greg Clayton [Thu, 23 Aug 2012 23:49:47 +0000 (23:49 +0000)]
Switch over to using object instances for all PythonData objects.

llvm-svn: 162504

9 years agoClarify the doc string for register-name a bit, add flags.
Jim Ingham [Thu, 23 Aug 2012 23:47:08 +0000 (23:47 +0000)]
Clarify the doc string for register-name a bit, add flags.

llvm-svn: 162503

9 years agoTake '--help' as well as '-h' as hint to emit the usage output.
Johnny Chen [Thu, 23 Aug 2012 23:45:26 +0000 (23:45 +0000)]
Take '--help' as well as '-h' as hint to emit the usage output.

llvm-svn: 162502

9 years agoNow that ASTMultiPtr is nothing more than a array reference, make it a MutableArrayRef.
Benjamin Kramer [Thu, 23 Aug 2012 23:38:35 +0000 (23:38 +0000)]
Now that ASTMultiPtr is nothing more than a array reference, make it a MutableArrayRef.

This required changing all get() calls to data() and using the simpler constructors.

llvm-svn: 162501

9 years agoDocument the generic register names in help for register-name.
Jim Ingham [Thu, 23 Aug 2012 23:37:31 +0000 (23:37 +0000)]
Document the generic register names in help for register-name.

llvm-svn: 162500

9 years agoFormatting cleanup.
Eric Christopher [Thu, 23 Aug 2012 23:26:57 +0000 (23:26 +0000)]
Formatting cleanup.

llvm-svn: 162499

9 years agoAdd an assert here in case parsing gave us a NULL compile unit.
Eric Christopher [Thu, 23 Aug 2012 23:21:11 +0000 (23:21 +0000)]
Add an assert here in case parsing gave us a NULL compile unit.

llvm-svn: 162498

9 years ago[scan-build] Accept -fno-objc-arc as well as -fobjc-arc.
Jordan Rose [Thu, 23 Aug 2012 23:16:34 +0000 (23:16 +0000)]
[scan-build] Accept -fno-objc-arc as well as -fobjc-arc.

This is how Xcode lets individual files be marked as non-ARC when the rest
of the project is ARC-enabled, so this is necessary for scan-build xcodebuild.

Patch by Paul Eipper!

llvm-svn: 162497