platform/upstream/llvm.git
9 years agoSimplify use of formatted_raw_ostream.
Rafael Espindola [Thu, 9 Apr 2015 21:06:08 +0000 (21:06 +0000)]
Simplify use of formatted_raw_ostream.

formatted_raw_ostream is a wrapper over another stream to add column and line
number tracking.

It is used only for asm printing.

This patch moves the its creation down to where we know we are printing
assembly. This has the following advantages:

* Simpler lifetime management: std::unique_ptr
* We don't compute column and line number of object files :-)

llvm-svn: 234535

9 years agoUpdate design.rst to remove a mention about round-trip tests.
Rui Ueyama [Thu, 9 Apr 2015 20:43:38 +0000 (20:43 +0000)]
Update design.rst to remove a mention about round-trip tests.

llvm-svn: 234534

9 years agoUse Linux sysroot in Driver test case from r234521
Reid Kleckner [Thu, 9 Apr 2015 20:37:38 +0000 (20:37 +0000)]
Use Linux sysroot in Driver test case from r234521

We don't actually need a real Mac sysroot to make the test pass, just a
linker.  This makes the test pass in environments where no ld is on
PATH.

llvm-svn: 234533

9 years ago[SEH] Outline finally blocks using the new variable capture support
Reid Kleckner [Thu, 9 Apr 2015 20:37:24 +0000 (20:37 +0000)]
[SEH] Outline finally blocks using the new variable capture support

WinEHPrepare was going to have to pattern match the control flow merge
and split that the old lowering used, and that wasn't really feasible.

Now we can teach WinEHPrepare to pattern match this, which is much
simpler:
  %fp = call i8* @llvm.frameaddress(i32 0)
  call void @func(iN [01], i8* %fp)

This prototype happens to match the prototype used by the Win64 SEH
personality function, so this is really simple.

llvm-svn: 234532

9 years agoFix printf format specifier to silence warning.
Chaoren Lin [Thu, 9 Apr 2015 20:21:42 +0000 (20:21 +0000)]
Fix printf format specifier to silence warning.

llvm-svn: 234531

9 years ago[CodeGen] Combine concat_vector of trunc'd scalar to scalar_to_vector.
Ahmed Bougacha [Thu, 9 Apr 2015 20:04:47 +0000 (20:04 +0000)]
[CodeGen] Combine concat_vector of trunc'd scalar to scalar_to_vector.

We already do:
  concat_vectors(scalar, undef) -> scalar_to_vector(scalar)
When the scalar is legal.
When it's not, but is a truncated legal scalar, we can also do:
  concat_vectors(trunc(scalar), undef) -> scalar_to_vector(scalar)
Which is equivalent, since the upper lanes are undef anyway.
While there, teach the combine to look at more than 2 operands.

Differential Revision: http://reviews.llvm.org/D8883

llvm-svn: 234530

9 years ago[AArch64][FastISel] Fix integer extend optimization.
Juergen Ributzka [Thu, 9 Apr 2015 20:00:46 +0000 (20:00 +0000)]
[AArch64][FastISel] Fix integer extend optimization.

The integer extend optimization tries to fold the extend into the load
instruction. This requires us to identify if the extend has already been
emitted or not and act accordingly on it.

The check that was originally performed for this was not sufficient. Besides
checking the ValueMap for a mapped register we also need to check if the
virtual register has already an associated machine instruction that defines it.

This fixes rdar://problem/20470788.

llvm-svn: 234529

9 years ago[Sema] Diagnose references to unbound arrays in function definitions
David Majnemer [Thu, 9 Apr 2015 19:53:25 +0000 (19:53 +0000)]
[Sema] Diagnose references to unbound arrays in function definitions

A [*] is only allowed in a declaration for a function, not in its
definition.  We didn't correctly recurse on reference types while
looking for it, causing us to crash in CodeGen instead of rejecting it.

llvm-svn: 234528

9 years ago[ItaniumABILanguageRuntime] Remove an unneccesary 'typename' keyword.
Siva Chandra [Thu, 9 Apr 2015 19:51:56 +0000 (19:51 +0000)]
[ItaniumABILanguageRuntime] Remove an unneccesary 'typename' keyword.

Summary: This will get the windows bots going.

Test Plan: Build LLDB on Windows.

Reviewers: zturner

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D8934

llvm-svn: 234527

9 years agoProperly implement warn_unused_result checking for classes/structs.
Kaelyn Takata [Thu, 9 Apr 2015 19:43:04 +0000 (19:43 +0000)]
Properly implement warn_unused_result checking for classes/structs.

The previous implementation would copy the attribute from the class to
functions that have the class as their return type when the functions
are first declared. This proved to have two flaws:
  1) if the class is forward-declared without the attribute and a
     function or method with the class as a its return type is declared,
     and afterward the class is defined with warn_unused_result, the
     function or method would never inherit the attribute, and
  2) the check simply failed for functions and methods that are part of
     a template instantiation, regardless of whether the class with
     warn_unused_result is part of a specific instantiation or part of
     the template itself (presumably because those function/method
     declaration does not hit the same code path as a non-template one
     and so never inherits the attribute).

The new approach is to instead modify the two places where a function or
method call is checked for the warn_unused_result attribute on the decl
by extending the checks to also look for the attribute on the decl's
return type.

Additionally, the check for return types that have the warn_unused_result
now excludes pointers and references to such types, as such return types do
not necessarily imply a transfer of ownership for the underlying object
being referred to by the return value. This does not change the behavior
of functions that are directly given the warn_unused_result attribute.

llvm-svn: 234526

9 years agoRemove duplicated code and consolidate initializers.
Eric Christopher [Thu, 9 Apr 2015 19:20:37 +0000 (19:20 +0000)]
Remove duplicated code and consolidate initializers.

llvm-svn: 234525

9 years ago[RenderScriptRuntime] Fix build after r234522.
Siva Chandra [Thu, 9 Apr 2015 19:13:54 +0000 (19:13 +0000)]
[RenderScriptRuntime] Fix build after r234522.

Test Plan: Build LLDB

Reviewers: domipheus

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D8933

llvm-svn: 234524

9 years ago[TestBitfields] Correct the attribute name to "aligned" in the testcase.
Siva Chandra [Thu, 9 Apr 2015 18:49:42 +0000 (18:49 +0000)]
[TestBitfields] Correct the attribute name to "aligned" in the testcase.

Summary:
This makes all parts of the test pass with Clang and GCC. They are
enabled with this patch.

Test Plan: dotest.py -C <clang|gcc> -p TestBitfields

Reviewers: vharron, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D8874

llvm-svn: 234523

9 years ago[IRForTarget] Strenghten handling of alternate mangling.
Siva Chandra [Thu, 9 Apr 2015 18:48:34 +0000 (18:48 +0000)]
[IRForTarget] Strenghten handling of alternate mangling.

Summary:
This fixes an issue with GCC generated binaries wherein an expression
with method invocations on std::string variables was failing. Such use
cases are tested in TestSTL (albeit, in a test marked with
@unittest2.expectedFailure because of other reasons).

The reason for this particular failure with GCC is that the generated
DWARF for std::basic_string<...> is incomplete, which makes clang not
to use the alternate mangling scheme. GCC correctly generates the name
of basic_string<...>:

DW_AT_name "basic_string<char, std::char_traits<char>, std::allocator<char> >"

It also lists the template parameters of basic_string correctly:

DW_TAG_template_type_parameter
    DW_AT_name                  "_CharT"
    DW_AT_type                  <0x0000009c>
DW_TAG_template_type_parameter
    DW_AT_name                  "_Traits"
    DW_AT_type                  <0x00000609>
DW_TAG_template_type_parameter
    DW_AT_name                  "_Alloc"
    DW_AT_type                  <0x000007fb>

However, it does not list the template parameters of std::char_traits<>.
This makes Clang feel (while parsing the expression) that the string
variable is not actually a basic_string instance, and consequently does
not use the alternate mangling scheme.

Test Plan:
dotest.py -C gcc -p TestSTL
          -- See it go past the "for" loop expression successfully.

Reviewers: clayborg, spyffe

Reviewed By: clayborg, spyffe

Subscribers: tberghammer, zturner, lldb-commits

Differential Revision: http://reviews.llvm.org/D8846

llvm-svn: 234522

9 years ago[ASan] Don't link against libc++abi when not using libc++
Hans Wennborg [Thu, 9 Apr 2015 18:47:01 +0000 (18:47 +0000)]
[ASan] Don't link against libc++abi when not using libc++

This is a follow-up to r233860 which added -lc++abi when using ASan
on Mac, and broke Chromium's ASan build which doesn't use libc++.

llvm-svn: 234521

9 years ago[Objective-C modern translation]. Patch to fix type of
Fariborz Jahanian [Thu, 9 Apr 2015 18:36:50 +0000 (18:36 +0000)]
[Objective-C modern translation]. Patch to fix type of
objc_msgSend's first argument to "Class" because
objc_getClass is passed. rdar://20477025

llvm-svn: 234520

9 years agoclang-format bits of code to make a followup patch easy to read.
Rafael Espindola [Thu, 9 Apr 2015 18:32:58 +0000 (18:32 +0000)]
clang-format bits of code to make a followup patch easy to read.

llvm-svn: 234519

9 years agoRevert "Refactoring and enhancement to FMA combine."
Rafael Espindola [Thu, 9 Apr 2015 18:29:32 +0000 (18:29 +0000)]
Revert "Refactoring and enhancement to FMA combine."

This reverts commit r234513. It was failing on the bots.

llvm-svn: 234518

9 years agoFix Debugger::HandleProcessEvent in case when ProcessIOHandler doesn't exist
Ilia K [Thu, 9 Apr 2015 18:18:10 +0000 (18:18 +0000)]
Fix Debugger::HandleProcessEvent in case when ProcessIOHandler doesn't exist

Summary:
Previously the Debugger::HandleProcessEvent hid a top IOHandler if the
process's IOHandler was inactive and later refreshed it. Usually the
IOHandler.Refresh() prints the (lldb) prompt. The problem was in case of
iOS remote platform when trying to execute 'command source' command.
On this platform the process's IOHandler is empty, therefore the
Debugger::HandleProcessEvent hid a top IOHandler and later refreshed it.
So that the (lldb) prompt was printed with a program output in mixed
order:
was:
```
  longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong
  longlonglonglonglonglonglonglonglonglonglonglonglonglonglon(lldb)
  glonglonglonglonglonglonglonglonglonglonglonglong string
```

now:
```
  longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong
  longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong
  longlonglonglonglonglonglonglonglong string
```

Reviewers: zturner, jingham, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits, jingham, zturner, clayborg

Differential Revision: http://reviews.llvm.org/D8929

llvm-svn: 234517

9 years ago[Python] Fix issue configuring sys.path during startup.
Zachary Turner [Thu, 9 Apr 2015 18:08:50 +0000 (18:08 +0000)]
[Python] Fix issue configuring sys.path during startup.

Previously, users on Windows had to manually specify PYTHONPATH
to point to the site-packages directory before running LLDB.
The reason for this was because sys.path was being initialized
with a path containing unescaped backslashes, causing escape
sequences to end up in the paths.

llvm-svn: 234516

9 years agoDefine a function with "... llvm::func...".
Rafael Espindola [Thu, 9 Apr 2015 18:08:15 +0000 (18:08 +0000)]
Define a function with "... llvm::func...".

Using this instead of
namespace llvm {
  func...
}

Has the advantage that the build fails with a compiler error if it gets out
of sync with the .h file.

llvm-svn: 234515

9 years agoFix @skipUnlessPlatform and @skipIfPlatform decorators to work on classes.
Robert Flack [Thu, 9 Apr 2015 18:07:58 +0000 (18:07 +0000)]
Fix @skipUnlessPlatform and @skipIfPlatform decorators to work on classes.

The decorators to skip if or unless certain platforms relied on calling
skipTest, which only worked if they were decorating individual test cases.
However for decorating entire classes it needs different behavior. This behavior
is already encapsulated in unittest2.skipIf and unittest2.skipUnless so this
modifies the platform decorators to use these unittest skip decorators.

Test Plan:
./dotest.py -t -p TestObjCMethods2.py
See skipped tests on linux, and see tests run on macosx.

Differential Revision: http://reviews.llvm.org/D8903

llvm-svn: 234514

9 years agoRefactoring and enhancement to FMA combine.
Olivier Sallenave [Thu, 9 Apr 2015 17:55:26 +0000 (17:55 +0000)]
Refactoring and enhancement to FMA combine.

llvm-svn: 234513

9 years ago[clang-tidy] Ignore expressions with incompatible deleters.
Samuel Benzaquen [Thu, 9 Apr 2015 17:51:01 +0000 (17:51 +0000)]
[clang-tidy] Ignore expressions with incompatible deleters.

Summary:
Do not warn on .reset(.release()) expressions if the deleters are not
compatible.
Using plain assignment will probably not work.

Reviewers: klimek

Subscribers: curdeius, cfe-commits

Differential Revision: http://reviews.llvm.org/D8422

llvm-svn: 234512

9 years agoInstall a diagnostic consumer into each new AST
Sean Callanan [Thu, 9 Apr 2015 17:42:48 +0000 (17:42 +0000)]
Install a diagnostic consumer into each new AST
context as the first thing we do.  This prevents
crashes if some of the initial setup produces
messages or errors.

<rdar://problem/20457882>

llvm-svn: 234511

9 years agoIR: Preserve use-list order by default in bitcode
Duncan P. N. Exon Smith [Thu, 9 Apr 2015 17:41:20 +0000 (17:41 +0000)]
IR: Preserve use-list order by default in bitcode

Pull the `-preserve-*-use-list-order` flags out of "experimental" mode,
and preserve use-list order by default when serializing to bitcode.

llvm-svn: 234510

9 years agoAdded flag to disable isel instruction on PPC target. Using regular branches instead...
Olivier Sallenave [Thu, 9 Apr 2015 17:38:50 +0000 (17:38 +0000)]
Added flag to disable isel instruction on PPC target. Using regular branches instead of isel is more efficient in some cases.

llvm-svn: 234509

9 years agoAdded the RenderScript language runtime plugin
Sean Callanan [Thu, 9 Apr 2015 17:26:21 +0000 (17:26 +0000)]
Added the RenderScript language runtime plugin
to the .xcodeproj.

llvm-svn: 234508

9 years agoUse a raw_svector_ostream instead of a raw_string_ostream.
Rafael Espindola [Thu, 9 Apr 2015 17:16:25 +0000 (17:16 +0000)]
Use a raw_svector_ostream instead of a raw_string_ostream.

It saves a bit of copying.

llvm-svn: 234507

9 years agoDon't repeat name in comment. NFC.
Rafael Espindola [Thu, 9 Apr 2015 17:10:57 +0000 (17:10 +0000)]
Don't repeat name in comment. NFC.

llvm-svn: 234506

9 years ago[NFC] add more comments for SLSR
Jingyue Wu [Thu, 9 Apr 2015 17:04:28 +0000 (17:04 +0000)]
[NFC] add more comments for SLSR

llvm-svn: 234505

9 years agoMisc cleanup. NFC.
Rafael Espindola [Thu, 9 Apr 2015 16:59:07 +0000 (16:59 +0000)]
Misc cleanup. NFC.

These were lost when I reverted the raw_ostream changes.

llvm-svn: 234504

9 years agoInitial language runtime support for RenderScript.
Colin Riley [Thu, 9 Apr 2015 16:49:25 +0000 (16:49 +0000)]
Initial language runtime support for RenderScript.

Plan is to have this initialized on a per-process basis somewhat the same as the ObjC library on module loading, but this commit is simply the foundation work and will be incrementally built upon to add that detection functionality.

Differential Revision: http://reviews.llvm.org/D8896

llvm-svn: 234503

9 years agoclang-format. NFC.
Rafael Espindola [Thu, 9 Apr 2015 16:43:22 +0000 (16:43 +0000)]
clang-format. NFC.

llvm-svn: 234502

9 years agoclang-format this constructor.
Rafael Espindola [Thu, 9 Apr 2015 16:37:11 +0000 (16:37 +0000)]
clang-format this constructor.

llvm-svn: 234501

9 years agoFix Xcode build after MipsLinuxSignals.cpp was added.
Greg Clayton [Thu, 9 Apr 2015 16:37:10 +0000 (16:37 +0000)]
Fix Xcode build after MipsLinuxSignals.cpp was added.

llvm-svn: 234500

9 years ago[CodeGen] When promoting a reference temporary to a global use the inner type to...
Benjamin Kramer [Thu, 9 Apr 2015 16:09:29 +0000 (16:09 +0000)]
[CodeGen] When promoting a reference temporary to a global use the inner type to fold it.

The MaterializeTemporaryExpr can have a different type than the inner
expression, miscompiling the constant. PR23165.

llvm-svn: 234499

9 years agoDon't repeat names in comments.
Rafael Espindola [Thu, 9 Apr 2015 16:06:26 +0000 (16:06 +0000)]
Don't repeat names in comments.

llvm-svn: 234498

9 years agoUse implicit calls to parent constructor. NFC.
Rafael Espindola [Thu, 9 Apr 2015 16:00:24 +0000 (16:00 +0000)]
Use implicit calls to parent constructor. NFC.

llvm-svn: 234497

9 years ago[ASan/Win] Add a test that makes sure coverage works at least in the simple cases
Timur Iskhodzhanov [Thu, 9 Apr 2015 15:58:38 +0000 (15:58 +0000)]
[ASan/Win] Add a test that makes sure coverage works at least in the simple cases

llvm-svn: 234496

9 years agoThis reverts commit r234460 and r234461.
Rafael Espindola [Thu, 9 Apr 2015 15:54:59 +0000 (15:54 +0000)]
This reverts commit r234460 and r234461.

Revert "Add classof implementations to the raw_ostream classes."
Revert "Use the cast machinery to remove dummy uses of formatted_raw_ostream."

The underlying issue can be fixed without classof.

llvm-svn: 234495

9 years ago[ASan/Win] Add more support for file operations
Timur Iskhodzhanov [Thu, 9 Apr 2015 15:25:21 +0000 (15:25 +0000)]
[ASan/Win] Add more support for file operations

llvm-svn: 234494

9 years agoProcess the -freciprocal-math optimization flag (PR20912)
Sanjay Patel [Thu, 9 Apr 2015 15:03:23 +0000 (15:03 +0000)]
Process the -freciprocal-math optimization flag (PR20912)

The driver currently accepts but ignores the -freciprocal-math flag.
This patch passes the flag through and enables 'arcp' fast-math-flag
generation in IR.

Note that this change does not actually enable the optimization for
any target. The reassociation optimization that this flag specifies
was implemented by http://reviews.llvm.org/D6334 :
http://llvm.org/viewvc/llvm-project?view=revision&revision=222510

Because the optimization is done in the backend rather than IR,
the backend must be modified to understand instruction-level
fast-math-flags or a new function-level attribute must be created.

Also note that -freciprocal-math is independent of any target-specific
usage of reciprocal estimate hardware instructions. That requires
its own flag ('-mrecip').

https://llvm.org/bugs/show_bug.cgi?id=20912

llvm-svn: 234493

9 years agoFix expectedFailureLLGS to expect failure when host platform is not linux.
Robert Flack [Thu, 9 Apr 2015 14:54:26 +0000 (14:54 +0000)]
Fix expectedFailureLLGS to expect failure when host platform is not linux.

expectedFailureLLGS has an early return false if the platform is not linux
except it should be checking the target platform on which the server is
running for remote tests.

Test Plan:
Verify expected failure when running from mac to remote linux llgs:
TestBreakAfterJoin.py, TestCreateDuringStep.py, TestExitDuringBreak.py,
TestProcessLaunch.py, TestThreadStates.py

Differential Revision: http://reviews.llvm.org/D8869

llvm-svn: 234492

9 years agoUse error_t rather than int in a couple of places where we handle files
Timur Iskhodzhanov [Thu, 9 Apr 2015 14:49:53 +0000 (14:49 +0000)]
Use error_t rather than int in a couple of places where we handle files

llvm-svn: 234491

9 years agoUse RenameFile instead of internal_rename in non-POSIX code
Timur Iskhodzhanov [Thu, 9 Apr 2015 14:45:17 +0000 (14:45 +0000)]
Use RenameFile instead of internal_rename in non-POSIX code

llvm-svn: 234490

9 years agoAdd info on running remote test suite to the website
Pavel Labath [Thu, 9 Apr 2015 14:23:24 +0000 (14:23 +0000)]
Add info on running remote test suite to the website

Reviewers: tberghammer, zturner

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D8873

llvm-svn: 234489

9 years ago[ARM] add support for Cortex-R4/R4F
Javed Absar [Thu, 9 Apr 2015 14:12:10 +0000 (14:12 +0000)]
[ARM] add support for Cortex-R4/R4F

Adds ARM Cortex-R4 and R4F support and tests in Clang. Though Cortex-R4
support was present, the support for hwdiv in thumb-mode was not defined
or tested properly. This has also been added.

llvm-svn: 234488

9 years agoUse WriteToFile instead of internal_write in non-POSIX code
Timur Iskhodzhanov [Thu, 9 Apr 2015 14:11:25 +0000 (14:11 +0000)]
Use WriteToFile instead of internal_write in non-POSIX code

llvm-svn: 234487

9 years ago[ARM] support for Cortex-R4/R4F
Javed Absar [Thu, 9 Apr 2015 14:07:28 +0000 (14:07 +0000)]
[ARM] support for Cortex-R4/R4F

Currently, llvm (backend) doesn't know cortex-r4, even though it is the
default target for armv7r. Using "--target=armv7r-arm-none-eabi" provokes
'cortex-r4' is not a recognized processor for this target' by llvm.
This patch adds support for cortex-r4 and, very closely related, r4f.

llvm-svn: 234486

9 years agoUse ReadFromFile instead of internal_read in non-POSIX code
Timur Iskhodzhanov [Thu, 9 Apr 2015 13:38:14 +0000 (13:38 +0000)]
Use ReadFromFile instead of internal_read in non-POSIX code

llvm-svn: 234485

9 years agoNothing inherits from the asm streamer.
Rafael Espindola [Thu, 9 Apr 2015 13:04:20 +0000 (13:04 +0000)]
Nothing inherits from the asm streamer.

Make that explicit and remove protected:

llvm-svn: 234484

9 years agoGenerate an event when a pending breakpoint binds
Ilia K [Thu, 9 Apr 2015 12:55:13 +0000 (12:55 +0000)]
Generate an event when a pending breakpoint binds

Summary:
This checkin sends an MI event when a module is loaded that causes a pending breakpoint to bind to it's real address in the target. This allows breakpoints to be set before the process is launched, and the target address of the BP to be discovered when the module loads, prior to the breakpoint being hit.

Patch from chuckr@microsoft.com

Test Plan:
I ran the check-lldb target with and without this patch and saw no change. I am unsure of how to write an MI specific test for this because the new event is buried in module load events. Here is an example (the new event is in bold):

```
(gdb)
-file-exec-and-symbols a.out
^done
(gdb)
=shlibs-added,shlib-info=[num="1",name="a.out",dyld-addr="-",reason="dyld",path="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/a.out",loaded_addr="-",dsym-objpath="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/a.out.dSYM/Contents/Resources/DWARF/a.out"]
-break-insert -f main.cpp:15
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xffffffffffffffff",func="main",file="main.cpp",fullname="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/main.cpp",line="15",pending=["main.cpp:15"],times="0",original-location="main.cpp:15"}
(gdb)
=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xffffffffffffffff",func="main",file="main.cpp",fullname="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/main.cpp",line="15",pending=["main.cpp:15"],times="0",original-location="main.cpp:15"}
-exec-run
^running
=thread-group-started,id="i1",pid="75620"
(gdb)
=thread-created,id="1",group-id="i1"
=thread-selected,id="1"
(gdb)
=shlibs-added,shlib-info=[num="2",name="dyld",dyld-addr="0x7fff5fc00000",reason="dyld",path="/usr/lib/dyld",loaded_addr="0x7fff5fc00000"]
(gdb)
=shlibs-added,shlib-info=[num="3",name="dyld",dyld-addr="0x7fff5fc00000",reason="dyld",path="/usr/lib/dyld",loaded_addr="0x7fff5fc00000"]
(gdb)
*running,thread-id="all"
(gdb)
(gdb)
=shlibs-added,shlib-info=[num="4",name="libc++.1.dylib",dyld-addr="0x7fff85dd0000",reason="dyld",path="/usr/lib/libc++.1.dylib",loaded_addr="0x7fff85dd0000"]
(gdb)
=shlibs-added,shlib-info=[num="5",name="libSystem.B.dylib",dyld-addr="0x7fff851ab000",reason="dyld",path="/usr/lib/libSystem.B.dylib",loaded_addr="0x7fff851ab000"]
(gdb)
=shlibs-added,shlib-info=[num="6",name="libc++abi.dylib",dyld-addr="0x7fff81be8000",reason="dyld",path="/usr/lib/libc++abi.dylib",loaded_addr="0x7fff81be8000"]
(gdb)
=shlibs-added,shlib-info=[num="7",name="libcache.dylib",dyld-addr="0x7fff8b975000",reason="dyld",path="/usr/lib/system/libcache.dylib",loaded_addr="0x7fff8b975000"]
(gdb)
=shlibs-added,shlib-info=[num="8",name="libcommonCrypto.dylib",dyld-addr="0x7fff85d14000",reason="dyld",path="/usr/lib/system/libcommonCrypto.dylib",loaded_addr="0x7fff85d14000"]
(gdb)
=shlibs-added,shlib-info=[num="9",name="libcompiler_rt.dylib",dyld-addr="0x7fff86154000",reason="dyld",path="/usr/lib/system/libcompiler_rt.dylib",loaded_addr="0x7fff86154000"]
(gdb)
=shlibs-added,shlib-info=[num="10",name="libcopyfile.dylib",dyld-addr="0x7fff81ac7000",reason="dyld",path="/usr/lib/system/libcopyfile.dylib",loaded_addr="0x7fff81ac7000"]
(gdb)
=shlibs-added,shlib-info=[num="11",name="libcorecrypto.dylib",dyld-addr="0x7fff87d5d000",reason="dyld",path="/usr/lib/system/libcorecrypto.dylib",loaded_addr="0x7fff87d5d000"]
(gdb)
=shlibs-added,shlib-info=[num="12",name="libdispatch.dylib",dyld-addr="0x7fff8ea8c000",reason="dyld",path="/usr/lib/system/libdispatch.dylib",loaded_addr="0x7fff8ea8c000"]
(gdb)
=shlibs-added,shlib-info=[num="13",name="libdyld.dylib",dyld-addr="0x7fff89087000",reason="dyld",path="/usr/lib/system/libdyld.dylib",loaded_addr="0x7fff89087000"]
(gdb)
=shlibs-added,shlib-info=[num="14",name="libkeymgr.dylib",dyld-addr="0x7fff8e818000",reason="dyld",path="/usr/lib/system/libkeymgr.dylib",loaded_addr="0x7fff8e818000"]
(gdb)
=shlibs-added,shlib-info=[num="15",name="liblaunch.dylib",dyld-addr="0x7fff84936000",reason="dyld",path="/usr/lib/system/liblaunch.dylib",loaded_addr="0x7fff84936000"]
(gdb)
=shlibs-added,shlib-info=[num="16",name="libmacho.dylib",dyld-addr="0x7fff8534e000",reason="dyld",path="/usr/lib/system/libmacho.dylib",loaded_addr="0x7fff8534e000"]
(gdb)
=shlibs-added,shlib-info=[num="17",name="libquarantine.dylib",dyld-addr="0x7fff90f97000",reason="dyld",path="/usr/lib/system/libquarantine.dylib",loaded_addr="0x7fff90f97000"]
(gdb)
=shlibs-added,shlib-info=[num="18",name="libremovefile.dylib",dyld-addr="0x7fff8ccb5000",reason="dyld",path="/usr/lib/system/libremovefile.dylib",loaded_addr="0x7fff8ccb5000"]
(gdb)
=shlibs-added,shlib-info=[num="19",name="libsystem_asl.dylib",dyld-addr="0x7fff8df67000",reason="dyld",path="/usr/lib/system/libsystem_asl.dylib",loaded_addr="0x7fff8df67000"]
(gdb)
=shlibs-added,shlib-info=[num="20",name="libsystem_blocks.dylib",dyld-addr="0x7fff8621c000",reason="dyld",path="/usr/lib/system/libsystem_blocks.dylib",loaded_addr="0x7fff8621c000"]
(gdb)
=shlibs-added,shlib-info=[num="21",name="libsystem_c.dylib",dyld-addr="0x7fff83c0f000",reason="dyld",path="/usr/lib/system/libsystem_c.dylib",loaded_addr="0x7fff83c0f000"]
(gdb)
=shlibs-added,shlib-info=[num="22",name="libsystem_configuration.dylib",dyld-addr="0x7fff8fd71000",reason="dyld",path="/usr/lib/system/libsystem_configuration.dylib",loaded_addr="0x7fff8fd71000"]
(gdb)
=shlibs-added,shlib-info=[num="23",name="libsystem_coreservices.dylib",dyld-addr="0x7fff8a028000",reason="dyld",path="/usr/lib/system/libsystem_coreservices.dylib",loaded_addr="0x7fff8a028000"]
(gdb)
=shlibs-added,shlib-info=[num="24",name="libsystem_coretls.dylib",dyld-addr="0x7fff90996000",reason="dyld",path="/usr/lib/system/libsystem_coretls.dylib",loaded_addr="0x7fff90996000"]
(gdb)
=shlibs-added,shlib-info=[num="25",name="libsystem_dnssd.dylib",dyld-addr="0x7fff8b71f000",reason="dyld",path="/usr/lib/system/libsystem_dnssd.dylib",loaded_addr="0x7fff8b71f000"]
(gdb)
=shlibs-added,shlib-info=[num="26",name="libsystem_info.dylib",dyld-addr="0x7fff8b9f2000",reason="dyld",path="/usr/lib/system/libsystem_info.dylib",loaded_addr="0x7fff8b9f2000"]
(gdb)
=shlibs-added,shlib-info=[num="27",name="libsystem_kernel.dylib",dyld-addr="0x7fff81ad0000",reason="dyld",path="/usr/lib/system/libsystem_kernel.dylib",loaded_addr="0x7fff81ad0000"]
(gdb)
=shlibs-added,shlib-info=[num="28",name="libsystem_m.dylib",dyld-addr="0x7fff84953000",reason="dyld",path="/usr/lib/system/libsystem_m.dylib",loaded_addr="0x7fff84953000"]
(gdb)
=shlibs-added,shlib-info=[num="29",name="libsystem_malloc.dylib",dyld-addr="0x7fff887bd000",reason="dyld",path="/usr/lib/system/libsystem_malloc.dylib",loaded_addr="0x7fff887bd000"]
(gdb)
=shlibs-added,shlib-info=[num="30",name="libsystem_network.dylib",dyld-addr="0x7fff88304000",reason="dyld",path="/usr/lib/system/libsystem_network.dylib",loaded_addr="0x7fff88304000"]
(gdb)
=shlibs-added,shlib-info=[num="31",name="libsystem_networkextension.dylib",dyld-addr="0x7fff82085000",reason="dyld",path="/usr/lib/system/libsystem_networkextension.dylib",loaded_addr="0x7fff82085000"]
(gdb)
=shlibs-added,shlib-info=[num="32",name="libsystem_notify.dylib",dyld-addr="0x7fff8eb69000",reason="dyld",path="/usr/lib/system/libsystem_notify.dylib",loaded_addr="0x7fff8eb69000"]
(gdb)
=shlibs-added,shlib-info=[num="33",name="libsystem_platform.dylib",dyld-addr="0x7fff89ac7000",reason="dyld",path="/usr/lib/system/libsystem_platform.dylib",loaded_addr="0x7fff89ac7000"]
(gdb)
=shlibs-added,shlib-info=[num="34",name="libsystem_pthread.dylib",dyld-addr="0x7fff83ff8000",reason="dyld",path="/usr/lib/system/libsystem_pthread.dylib",loaded_addr="0x7fff83ff8000"]
(gdb)
=shlibs-added,shlib-info=[num="35",name="libsystem_sandbox.dylib",dyld-addr="0x7fff89084000",reason="dyld",path="/usr/lib/system/libsystem_sandbox.dylib",loaded_addr="0x7fff89084000"]
(gdb)
=shlibs-added,shlib-info=[num="36",name="libsystem_secinit.dylib",dyld-addr="0x7fff8e816000",reason="dyld",path="/usr/lib/system/libsystem_secinit.dylib",loaded_addr="0x7fff8e816000"]
(gdb)
=shlibs-added,shlib-info=[num="37",name="libsystem_stats.dylib",dyld-addr="0x7fff89eaf000",reason="dyld",path="/usr/lib/system/libsystem_stats.dylib",loaded_addr="0x7fff89eaf000"]
(gdb)
=shlibs-added,shlib-info=[num="38",name="libsystem_trace.dylib",dyld-addr="0x7fff8ead4000",reason="dyld",path="/usr/lib/system/libsystem_trace.dylib",loaded_addr="0x7fff8ead4000"]
(gdb)
=shlibs-added,shlib-info=[num="39",name="libunc.dylib",dyld-addr="0x7fff8ab27000",reason="dyld",path="/usr/lib/system/libunc.dylib",loaded_addr="0x7fff8ab27000"]
(gdb)
=shlibs-added,shlib-info=[num="40",name="libunwind.dylib",dyld-addr="0x7fff85cf3000",reason="dyld",path="/usr/lib/system/libunwind.dylib",loaded_addr="0x7fff85cf3000"]
(gdb)
=shlibs-added,shlib-info=[num="41",name="libxpc.dylib",dyld-addr="0x7fff88896000",reason="dyld",path="/usr/lib/system/libxpc.dylib",loaded_addr="0x7fff88896000"]
(gdb)
=shlibs-added,shlib-info=[num="42",name="libobjc.A.dylib",dyld-addr="0x7fff84f13000",reason="dyld",path="/usr/lib/libobjc.A.dylib",loaded_addr="0x7fff84f13000"]
(gdb)
=shlibs-added,shlib-info=[num="43",name="libauto.dylib",dyld-addr="0x7fff85d89000",reason="dyld",path="/usr/lib/libauto.dylib",loaded_addr="0x7fff85d89000"]
(gdb)
=shlibs-added,shlib-info=[num="44",name="libDiagnosticMessagesClient.dylib",dyld-addr="0x7fff822e1000",reason="dyld",path="/usr/lib/libDiagnosticMessagesClient.dylib",loaded_addr="0x7fff822e1000"]
```
=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000100000f4d",func="main",file="main.cpp",fullname="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/main.cpp",line="15",pending=["main.cpp:15"],times="0",original-location="main.cpp:15"}
```
(gdb)
=shlibs-added,shlib-info=[num="45",name="a.out",dyld-addr="0x100000000",reason="dyld",path="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/a.out",loaded_addr="0x100000000",dsym-objpath="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/a.out.dSYM/Contents/Resources/DWARF/a.out"]
=shlibs-added,shlib-info=[num="46",name="libc++.1.dylib",dyld-addr="0x7fff85dd0000",reason="dyld",path="/usr/lib/libc++.1.dylib",loaded_addr="0x7fff85dd0000"]
=shlibs-added,shlib-info=[num="47",name="libSystem.B.dylib",dyld-addr="0x7fff851ab000",reason="dyld",path="/usr/lib/libSystem.B.dylib",loaded_addr="0x7fff851ab000"]
=shlibs-added,shlib-info=[num="48",name="libc++abi.dylib",dyld-addr="0x7fff81be8000",reason="dyld",path="/usr/lib/libc++abi.dylib",loaded_addr="0x7fff81be8000"]
=shlibs-added,shlib-info=[num="49",name="libcache.dylib",dyld-addr="0x7fff8b975000",reason="dyld",path="/usr/lib/system/libcache.dylib",loaded_addr="0x7fff8b975000"]
=shlibs-added,shlib-info=[num="50",name="libcommonCrypto.dylib",dyld-addr="0x7fff85d14000",reason="dyld",path="/usr/lib/system/libcommonCrypto.dylib",loaded_addr="0x7fff85d14000"]
=shlibs-added,shlib-info=[num="51",name="libcompiler_rt.dylib",dyld-addr="0x7fff86154000",reason="dyld",path="/usr/lib/system/libcompiler_rt.dylib",loaded_addr="0x7fff86154000"]
=shlibs-added,shlib-info=[num="52",name="libcopyfile.dylib",dyld-addr="0x7fff81ac7000",reason="dyld",path="/usr/lib/system/libcopyfile.dylib",loaded_addr="0x7fff81ac7000"]
=shlibs-added,shlib-info=[num="53",name="libcorecrypto.dylib",dyld-addr="0x7fff87d5d000",reason="dyld",path="/usr/lib/system/libcorecrypto.dylib",loaded_addr="0x7fff87d5d000"]
=shlibs-added,shlib-info=[num="54",name="libdispatch.dylib",dyld-addr="0x7fff8ea8c000",reason="dyld",path="/usr/lib/system/libdispatch.dylib",loaded_addr="0x7fff8ea8c000"]
=shlibs-added,shlib-info=[num="55",name="libdyld.dylib",dyld-addr="0x7fff89087000",reason="dyld",path="/usr/lib/system/libdyld.dylib",loaded_addr="0x7fff89087000"]
=shlibs-added,shlib-info=[num="56",name="libkeymgr.dylib",dyld-addr="0x7fff8e818000",reason="dyld",path="/usr/lib/system/libkeymgr.dylib",loaded_addr="0x7fff8e818000"]
=shlibs-added,shlib-info=[num="57",name="liblaunch.dylib",dyld-addr="0x7fff84936000",reason="dyld",path="/usr/lib/system/liblaunch.dylib",loaded_addr="0x7fff84936000"]
=shlibs-added,shlib-info=[num="58",name="libmacho.dylib",dyld-addr="0x7fff8534e000",reason="dyld",path="/usr/lib/system/libmacho.dylib",loaded_addr="0x7fff8534e000"]
=shlibs-added,shlib-info=[num="59",name="libquarantine.dylib",dyld-addr="0x7fff90f97000",reason="dyld",path="/usr/lib/system/libquarantine.dylib",loaded_addr="0x7fff90f97000"]
=shlibs-added,shlib-info=[num="60",name="libremovefile.dylib",dyld-addr="0x7fff8ccb5000",reason="dyld",path="/usr/lib/system/libremovefile.dylib",loaded_addr="0x7fff8ccb5000"]
=shlibs-added,shlib-info=[num="61",name="libsystem_asl.dylib",dyld-addr="0x7fff8df67000",reason="dyld",path="/usr/lib/system/libsystem_asl.dylib",loaded_addr="0x7fff8df67000"]
=shlibs-added,shlib-info=[num="62",name="libsystem_blocks.dylib",dyld-addr="0x7fff8621c000",reason="dyld",path="/usr/lib/system/libsystem_blocks.dylib",loaded_addr="0x7fff8621c000"]
=shlibs-added,shlib-info=[num="63",name="libsystem_c.dylib",dyld-addr="0x7fff83c0f000",reason="dyld",path="/usr/lib/system/libsystem_c.dylib",loaded_addr="0x7fff83c0f000"]
=shlibs-added,shlib-info=[num="64",name="libsystem_configuration.dylib",dyld-addr="0x7fff8fd71000",reason="dyld",path="/usr/lib/system/libsystem_configuration.dylib",loaded_addr="0x7fff8fd71000"]
=shlibs-added,shlib-info=[num="65",name="libsystem_coreservices.dylib",dyld-addr="0x7fff8a028000",reason="dyld",path="/usr/lib/system/libsystem_coreservices.dylib",loaded_addr="0x7fff8a028000"]
=shlibs-added,shlib-info=[num="66",name="libsystem_coretls.dylib",dyld-addr="0x7fff90996000",reason="dyld",path="/usr/lib/system/libsystem_coretls.dylib",loaded_addr="0x7fff90996000"]
=shlibs-added,shlib-info=[num="67",name="libsystem_dnssd.dylib",dyld-addr="0x7fff8b71f000",reason="dyld",path="/usr/lib/system/libsystem_dnssd.dylib",loaded_addr="0x7fff8b71f000"]
=shlibs-added,shlib-info=[num="68",name="libsystem_info.dylib",dyld-addr="0x7fff8b9f2000",reason="dyld",path="/usr/lib/system/libsystem_info.dylib",loaded_addr="0x7fff8b9f2000"]
=shlibs-added,shlib-info=[num="69",name="libsystem_kernel.dylib",dyld-addr="0x7fff81ad0000",reason="dyld",path="/usr/lib/system/libsystem_kernel.dylib",loaded_addr="0x7fff81ad0000"]
=shlibs-added,shlib-info=[num="70",name="libsystem_m.dylib",dyld-addr="0x7fff84953000",reason="dyld",path="/usr/lib/system/libsystem_m.dylib",loaded_addr="0x7fff84953000"]
=shlibs-added,shlib-info=[num="71",name="libsystem_malloc.dylib",dyld-addr="0x7fff887bd000",reason="dyld",path="/usr/lib/system/libsystem_malloc.dylib",loaded_addr="0x7fff887bd000"]
=shlibs-added,shlib-info=[num="72",name="libsystem_network.dylib",dyld-addr="0x7fff88304000",reason="dyld",path="/usr/lib/system/libsystem_network.dylib",loaded_addr="0x7fff88304000"]
=shlibs-added,shlib-info=[num="73",name="libsystem_networkextension.dylib",dyld-addr="0x7fff82085000",reason="dyld",path="/usr/lib/system/libsystem_networkextension.dylib",loaded_addr="0x7fff82085000"]
=shlibs-added,shlib-info=[num="74",name="libsystem_notify.dylib",dyld-addr="0x7fff8eb69000",reason="dyld",path="/usr/lib/system/libsystem_notify.dylib",loaded_addr="0x7fff8eb69000"]
=shlibs-added,shlib-info=[num="75",name="libsystem_platform.dylib",dyld-addr="0x7fff89ac7000",reason="dyld",path="/usr/lib/system/libsystem_platform.dylib",loaded_addr="0x7fff89ac7000"]
=shlibs-added,shlib-info=[num="76",name="libsystem_pthread.dylib",dyld-addr="0x7fff83ff8000",reason="dyld",path="/usr/lib/system/libsystem_pthread.dylib",loaded_addr="0x7fff83ff8000"]
=shlibs-added,shlib-info=[num="77",name="libsystem_sandbox.dylib",dyld-addr="0x7fff89084000",reason="dyld",path="/usr/lib/system/libsystem_sandbox.dylib",loaded_addr="0x7fff89084000"]
=shlibs-added,shlib-info=[num="78",name="libsystem_secinit.dylib",dyld-addr="0x7fff8e816000",reason="dyld",path="/usr/lib/system/libsystem_secinit.dylib",loaded_addr="0x7fff8e816000"]
=shlibs-added,shlib-info=[num="79",name="libsystem_stats.dylib",dyld-addr="0x7fff89eaf000",reason="dyld",path="/usr/lib/system/libsystem_stats.dylib",loaded_addr="0x7fff89eaf000"]
=shlibs-added,shlib-info=[num="80",name="libsystem_trace.dylib",dyld-addr="0x7fff8ead4000",reason="dyld",path="/usr/lib/system/libsystem_trace.dylib",loaded_addr="0x7fff8ead4000"]
=shlibs-added,shlib-info=[num="81",name="libunc.dylib",dyld-addr="0x7fff8ab27000",reason="dyld",path="/usr/lib/system/libunc.dylib",loaded_addr="0x7fff8ab27000"]
=shlibs-added,shlib-info=[num="82",name="libunwind.dylib",dyld-addr="0x7fff85cf3000",reason="dyld",path="/usr/lib/system/libunwind.dylib",loaded_addr="0x7fff85cf3000"]
=shlibs-added,shlib-info=[num="83",name="libxpc.dylib",dyld-addr="0x7fff88896000",reason="dyld",path="/usr/lib/system/libxpc.dylib",loaded_addr="0x7fff88896000"]
=shlibs-added,shlib-info=[num="84",name="libobjc.A.dylib",dyld-addr="0x7fff84f13000",reason="dyld",path="/usr/lib/libobjc.A.dylib",loaded_addr="0x7fff84f13000"]
=shlibs-added,shlib-info=[num="85",name="libauto.dylib",dyld-addr="0x7fff85d89000",reason="dyld",path="/usr/lib/libauto.dylib",loaded_addr="0x7fff85d89000"]
=shlibs-added,shlib-info=[num="86",name="libDiagnosticMessagesClient.dylib",dyld-addr="0x7fff822e1000",reason="dyld",path="/usr/lib/libDiagnosticMessagesClient.dylib",loaded_addr="0x7fff822e1000"]
(gdb)
*stopped,reason="breakpoint-hit",disp="del",bkptno="1",frame={addr="0x0000000100000f4d",func="main",args=[{name="argc",value="1"},{name="argv",value="0x00007fff5fbffed8"}],file="main.cpp",fullname="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/main.cpp",line="15"},thread-id="1",stopped-threads="all"
(gdb)
```

Reviewers: abidh, clayborg, ChuckR, jingham

Subscribers: ki.stfu, paulmaybee, lldb-commits

Differential Revision: http://reviews.llvm.org/D8847

llvm-svn: 234483

9 years agoMove more POSIX-specific functions to sanitizer_posix.h
Timur Iskhodzhanov [Thu, 9 Apr 2015 12:54:06 +0000 (12:54 +0000)]
Move more POSIX-specific functions to sanitizer_posix.h

llvm-svn: 234482

9 years agoIntroduce CloseFile to be used instead of internal_close on non-POSIX
Timur Iskhodzhanov [Thu, 9 Apr 2015 12:37:05 +0000 (12:37 +0000)]
Introduce CloseFile to be used instead of internal_close on non-POSIX

llvm-svn: 234481

9 years agoFix MiGdbSetShowTestCase.test_lldbmi_gdb_set_ouptut_radix after r234476
Ilia K [Thu, 9 Apr 2015 12:21:56 +0000 (12:21 +0000)]
Fix MiGdbSetShowTestCase.test_lldbmi_gdb_set_ouptut_radix after r234476

This includes:
* Add CMICmnLLDBUtilSBValue::IsIntegerType to check integer type
* Improve CMICmnLLDBDebugSessionInfoVarObj::GetValueStringFormatted to handle veVarFormat arg

llvm-svn: 234480

9 years agoReplace a hard-coded constant with a named one
Timur Iskhodzhanov [Thu, 9 Apr 2015 12:20:02 +0000 (12:20 +0000)]
Replace a hard-coded constant with a named one

llvm-svn: 234479

9 years agoDo not recommend -polly-vectorizer=polly
Tobias Grosser [Thu, 9 Apr 2015 12:10:36 +0000 (12:10 +0000)]
Do not recommend -polly-vectorizer=polly

Instead, we recommend -polly-vectorizer=stripmine, which pre-vectorizers outer
loops for the LoopVectorizer to take over.

llvm-svn: 234478

9 years agoDifferential Revision: http://reviews.llvm.org/D7249
Lorenzo Martignoni [Thu, 9 Apr 2015 11:42:33 +0000 (11:42 +0000)]
Differential Revision: reviews.llvm.org/D7249

llvm-svn: 234477

9 years agoRefactor CMICmnLLDBDebuggerHandleEvents/CMICmnLLDBDebugSessionInfo/CMICmnLLDBDebugSes...
Ilia K [Thu, 9 Apr 2015 11:17:54 +0000 (11:17 +0000)]
Refactor CMICmnLLDBDebuggerHandleEvents/CMICmnLLDBDebugSessionInfo/CMICmnLLDBDebugSessionInfoVarObj (MI)

Summary:
This patch includes the following changes:

# Refactor GetVariableInfo/GetValueStringFormatted/GetValue to use the same code (MI)
Also it expands the variable value format for strings (aka char*):
was:
```
^done,name="v4",numchild="1",value="0x0000000100000f56",type="const char *",thread-id="1",has_more="0"
```
now:
```
^done,name="v4",numchild="1",value="0x0000000100000f56 \"ab\"",type="const char *",thread-id="1",has_more="0"
```

# Expand the variable value format for arrays (according to GDB)
For example:
was:
```
^done,name="v3",numchild="2",value="{...}",type="char [2]",thread-id="1",has_more="0"
```
now:
```
^done,name="v3",numchild="2",value="[2]",type="char [2]",thread-id="1",has_more="0"
```

# Rename MiGdbSetShowTestCase.test_lldbmi_gdb_show_process_stopatentry_default to test_lldbmi_gdb_show_process_stopatentry (MI)

# Fix a comment in MiGdbSetShowTestCase.test_lldbmi_gdb_show_process_stopatentry (MI)

# Refactor CMICmnLLDBUtilSBValue
## Add CMICmnLLDBUtilSBValue::IsPointerType/IsArrayType
## Refactor CMICmnLLDBUtilSBValue::GetValue
## Fix CMICmnLLDBUtilSBValue::IsChildCharType to ignore a number of childs
## Rename CMICmnLLDBUtilSBValue::IsChildCharType to IsFirstChildCharType
## Fix CMICmnLLDBUtilSBValue::GetValueCString to accept char[]

# Minor changes in CMICmnLLDBUtilSBValue::GetValue

# Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo family functions (MI)

# Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo family functions (MI)
## Remove CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo2
## Improve CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo to accept args

# Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo family functions (MI)
## Add vArgInfo arg to CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo
## Move CMICmnLLDBDebugSessionInfo::GetFrameInfo/MIResponseFormFrameInfo to private namespace

# Refactor CMICmnLLDBDebugSessionInfo::GetThreadFrames family functions (MI)
## Remove CMICmnLLDBDebugSessionInfo::GetThreadFrames2
## Improve CMICmnLLDBDebugSessionInfo::GetThreadFrames to accept vnMaxDepth

# Fix vnMaxDepth arg name in CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo (MI)

# Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo family functions (MI)
## Merge CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo functions into one

# Don't modify fnName in CMICmnLLDBDebugSessionInfo::GetThreadFrames (MI)

# Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo family functions (MI)
## Remove CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo3
## Improve -CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo to accept vnMaxDepth

# Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo family functions (MI)
## Remove CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo2
## Add CMICmnLLDBDebugSessionInfo::ThreadInfoFormat_e enum to specify thread format
## Improve CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo to accept veThreadInfoFormat
## Remove vnMaxDepth arg in CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo (not needed because veThreadInfoFormat was added)

# Move CMICmnLLDBDebugSessionInfo::GetThreadFrames to private namespace (MI)

# Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo (MI)
## Add CMICmnLLDBDebugSessionInfo::FrameInfoFormat_e enum to specify frame format
## Improve CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo to accept veFrameInfoFormat
## Remove vnMaxDepth arg in CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo (not needed because veFrameInfoFormat was added)

# Remove duplicated level field in CMICmnLLDBDebugSessionInfo::GetThreadFrames (MI)

# Refactor CMICmnLLDBUtilSBValue::GetValue (MI)
## Add CMICmnLLDBUtilSBValue::GetSimpleValue
## Use CMICmnLLDBUtilSBValue::GetSimpleValue in GetVlaue

# Fix CMICmnLLDBDebugSessionInfo::GetThreadFrames (MI)
## Add CMICmnLLDBDebugSessionInfo::FrameInfoFormat_e::eFrameInfoFormat_AllArgumentsInSimpleForm which is used to get stack-args in simple form (i.e. show {...} for composite types). It can be done by calling MIResponseFormVariableInfo with vnMaxDepth=0.
## Improve CMICmnLLDBDebugSessionInfo::GetThreadFrames to accept veFrameInfoFormat
## Remove vnMaxDepth from CMICmnLLDBDebugSessionInfo::GetThreadFrames (we should use veFrameInfoFormat instead)

# Refactor CMICmnLLDBUtilSBValue::GetValue to expand composite types (MI)
## Add CMICmnLLDBUtilSBValue::GetCompositeValue to expand composite types
## Add CMICmnLLDBUtilSBValue::m_pComposite to avoid multiple {...} in the code
## Improve CMICmnLLDBUtilSBValue::GetValue to accept vbExpandAggregates option (default=false)
## Clean up CMICmnLLDBDebugSessionInfo::GetVariableInfo to use CMICmnLLDBUtilSBValue::GetValue
## Remove the wrapping into {} in CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo
## Fix MiStackTestCase.test_lldbmi_stack_list_locals test to expect result without superfluous space ' ' around the '{' or '}' brackets:
was:
```
{name=\"var_c\",value=\"{var_a = 10,var_b = 97 'a',inner_ = { var_d = 30 }}
```
now:
```
{name=\"var_c\",value=\"{var_a = 10,var_b = 97 'a',inner_ = {var_d = 30}}
```
## Fix vwrValue arg name in CMICmnLLDBUtilSBValue::GetSimpleValue (was vrValue)

# Refactor CMICmnLLDBDebugSessionInfo::GetVariableInfo (MI)
## Remove vnMaxDepth/vbIsChildValue/vnDepth args in CMICmnLLDBDebugSessionInfo::GetVariableInfo
## Improve CMICmnLLDBDebugSessionInfo::GetVariableInfo to accept vwrStrValue
## Remove vwrMiValueList arg in CMICmnLLDBDebugSessionInfo::GetVariableInfo (we should use vwrStrValue instead)
## Fix CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo to Escape values
was:
```
{name="p",value="0x0000000000000000 """}
```
now:
```
{name="p",value="0x0000000000000000 \"\""}
```

# Refactor CMICmnLLDBUtilSBValue
## Improve CMICmnLLDBUtilSBValue::GetValue to handle PrintExpandAggregates
## Improve CMICmnLLDBUtilSBValue::GetSimpleValue to handle vbHandleArrayType (use it to specify that array should be represented as simple type, i.e. value="[2]")

# Add spacing between fields in CMICmnLLDBUtilSBValue::GetCompositeValue (MI)
For example:
was:
```
^done,name="var3",numchild="3",value="{i = 3,inner = {l = 3},complex_ptr = 0x00007fff5fbff848}",type="complex_type",thread-id="1",has_more="0"
```
now:
```
^done,name="var3",numchild="3",value="{i = 3, inner = {l = 3}, complex_ptr = 0x00007fff5fbff848}",type="complex_type",thread-id="1",has_more="0"
```

# Fix spacing in MiStackTestCase.test_lldbmi_stack_list_locals test (MI)

Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/

Reviewers: abidh

Subscribers: lldb-commits, abidh

Differential Revision: http://reviews.llvm.org/D8913

llvm-svn: 234476

9 years ago[mips] Refactor saved-registers bitmask creation in MipsAsmPrinter::printSavedRegsBit...
Toma Tabacu [Thu, 9 Apr 2015 10:54:16 +0000 (10:54 +0000)]
[mips] Refactor saved-registers bitmask creation in MipsAsmPrinter::printSavedRegsBitmask. NFC.

Summary:
Make the code more readable by fusing the for-loops together and explicitly checking for each register class.

Also, this version is more straightforward because it doesn't assume that FPU registers always come before CPU registers in the CalleeSavedInfo vector.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D8033

llvm-svn: 234475

9 years ago[ARM] clang-format ARM sources
Denis Protivensky [Thu, 9 Apr 2015 10:17:22 +0000 (10:17 +0000)]
[ARM] clang-format ARM sources

llvm-svn: 234474

9 years ago[ARM] Add mapping symbols to veneers
Denis Protivensky [Thu, 9 Apr 2015 09:59:18 +0000 (09:59 +0000)]
[ARM] Add mapping symbols to veneers

This required splitting up veneer atoms into pieces,
where every piece is paired with mapping atom of
the corresponding type.

llvm-svn: 234473

9 years ago[Sanitizer] Get rid of PlatformGetListOfModules
Kuba Brecka [Thu, 9 Apr 2015 09:37:46 +0000 (09:37 +0000)]
[Sanitizer] Get rid of PlatformGetListOfModules

Moving the implementation of several functions from sanitizer_symbolizer.cc into sanitizer_symbolizer_libcdep.cc.

Reviewed at http://reviews.llvm.org/D8858

llvm-svn: 234472

9 years ago[AArch64] Add support for dynamic stack alignment
Kristof Beyls [Thu, 9 Apr 2015 08:49:47 +0000 (08:49 +0000)]
[AArch64] Add support for dynamic stack alignment

Differential Revision: http://reviews.llvm.org/D8876

llvm-svn: 234471

9 years ago[ASan] Only include rpc headers if they are available.
Yury Gribov [Thu, 9 Apr 2015 08:06:49 +0000 (08:06 +0000)]
[ASan] Only include rpc headers if they are available.

Reviewed at http://reviews.llvm.org/D8698

llvm-svn: 234470

9 years ago[LLDB][MIPS] Add LinuxSignals for mips64 and change trap opcode for mips64el.
Mohit K. Bhakkad [Thu, 9 Apr 2015 07:12:15 +0000 (07:12 +0000)]
[LLDB][MIPS] Add LinuxSignals for mips64 and change trap opcode for mips64el.
Patch by Sagar Thakur

- Added LinuxSignals for MIPS64.
- Changed software trap opcode for mips64el.

Reviewers: clayborg, tberghammer.

Subscribers: emaste, jaydeep, bhushan, mohit.bhakkad, llvm-commits.

Differential Revision: http://reviews.llvm.org/D8856

llvm-svn: 234469

9 years ago[Compiler-rt][MIPS] Fix for asan test suite build on mips64/mips64el
Mohit K. Bhakkad [Thu, 9 Apr 2015 06:58:32 +0000 (06:58 +0000)]
[Compiler-rt][MIPS] Fix for asan test suite build on mips64/mips64el
Patch by Sagar Thakur

Reviewers: dsanders
llvm-svn: 234468

9 years ago[AArch64] Remove redundant -march option. Also fix a think-o from r234462.
Lang Hames [Thu, 9 Apr 2015 05:34:57 +0000 (05:34 +0000)]
[AArch64] Remove redundant -march option. Also fix a think-o from r234462.

llvm-svn: 234467

9 years agoNot all triples put _ before function names. Specify a triple to make this test pass...
Nick Lewycky [Thu, 9 Apr 2015 05:31:32 +0000 (05:31 +0000)]
Not all triples put _ before function names. Specify a triple to make this test pass on Linux.

llvm-svn: 234466

9 years agoUse SmallVector instead of std::vector for uniquing X86 disassembler operand sets...
Craig Topper [Thu, 9 Apr 2015 04:08:48 +0000 (04:08 +0000)]
Use SmallVector instead of std::vector for uniquing X86 disassembler operand sets. The number of operands is a small fixed size.

llvm-svn: 234465

9 years agoSimplify some printing code by combining new lines onto previous strings. Don't work...
Craig Topper [Thu, 9 Apr 2015 04:08:46 +0000 (04:08 +0000)]
Simplify some printing code by combining new lines onto previous strings. Don't work so hard not to print a comma on the last entry of an array.

llvm-svn: 234464

9 years agoDon't convert enum to strings just to put them in the uniquing map. Use the enum...
Craig Topper [Thu, 9 Apr 2015 04:08:42 +0000 (04:08 +0000)]
Don't convert enum to strings just to put them in the uniquing map. Use the enum directly. Only convert to a string for printing.

llvm-svn: 234463

9 years ago[AArch64] Teach AArch64TargetLowering::getOptimalMemOpType to consider alignment
Lang Hames [Thu, 9 Apr 2015 03:40:33 +0000 (03:40 +0000)]
[AArch64] Teach AArch64TargetLowering::getOptimalMemOpType to consider alignment
restrictions when choosing a type for small-memcpy inlining in
SelectionDAGBuilder.

This ensures that the loads and stores output for the memcpy won't be further
expanded during legalization, which would cause the total number of instructions
for the memcpy to exceed (often significantly) the inlining thresholds.

<rdar://problem/17829180>

llvm-svn: 234462

9 years agoUse the cast machinery to remove dummy uses of formatted_raw_ostream.
Rafael Espindola [Thu, 9 Apr 2015 02:28:12 +0000 (02:28 +0000)]
Use the cast machinery to remove dummy uses of formatted_raw_ostream.

If we know we are producing an object, we don't need to wrap the stream
in a formatted_raw_ostream anymore.

llvm-svn: 234461

9 years agoAdd classof implementations to the raw_ostream classes.
Rafael Espindola [Thu, 9 Apr 2015 02:10:28 +0000 (02:10 +0000)]
Add classof implementations to the raw_ostream classes.

More uses to follow in a another patch.

llvm-svn: 234460

9 years agoDelete unused constructor.
Rafael Espindola [Thu, 9 Apr 2015 01:11:26 +0000 (01:11 +0000)]
Delete unused constructor.

llvm-svn: 234459

9 years agoUpdate comment to refer to software floating point rather than
Eric Christopher [Thu, 9 Apr 2015 00:14:49 +0000 (00:14 +0000)]
Update comment to refer to software floating point rather than
a local variable.

llvm-svn: 234457

9 years agoMissed moving a variable during my previous revision 234455.
Greg Clayton [Thu, 9 Apr 2015 00:12:33 +0000 (00:12 +0000)]
Missed moving a variable during my previous revision 234455.

llvm-svn: 234456

9 years agoDarwin read()/pread()/fread() and write()/pwrite()/fwrite() calls can only write...
Greg Clayton [Thu, 9 Apr 2015 00:06:44 +0000 (00:06 +0000)]
Darwin read()/pread()/fread() and write()/pwrite()/fwrite() calls can only write INT_MAX bytes at a time.

Modify all read/write calls to allow any system to define MAX_READ_SIZE or MAX_WRITE_SIZE so large reads and writes can be divided up correctly.

<rdar://problem/20471411>

llvm-svn: 234455

9 years agoAtomVector: Reorder member orders to use template alias in AtomRange.
Rui Ueyama [Wed, 8 Apr 2015 23:12:48 +0000 (23:12 +0000)]
AtomVector: Reorder member orders to use template alias in AtomRange.

llvm-svn: 234453

9 years agoRename atom_collection -> AtomVector.
Rui Ueyama [Wed, 8 Apr 2015 23:05:59 +0000 (23:05 +0000)]
Rename atom_collection -> AtomVector.

Type names should start with an uppercase letter in the LLVM coding style.

llvm-svn: 234452

9 years agoUse option -march instead of -mtriple to avoid overconditionalizing the test.
Akira Hatanaka [Wed, 8 Apr 2015 23:02:45 +0000 (23:02 +0000)]
Use option -march instead of -mtriple to avoid overconditionalizing the test.

This fixes r234439, which was committed to fix the test failures caused by
r234430.

llvm-svn: 234451

9 years agoSeparate atom_collection type into two different types. NFC.
Rui Ueyama [Wed, 8 Apr 2015 23:02:11 +0000 (23:02 +0000)]
Separate atom_collection type into two different types. NFC.

atom_collection is basically a wrapper for std::vector. The class
provides begin and end member functions, so that it "hides" the
other member functions provided by std::vector. However, you can
still directly access _atoms member since the member is not
protected.

We cannot simply make the member private because we need that member
when we are constructing atom vectors.

This patch splits atom_collection into two types: std::vector<Atom *>
and AtomRange. When we are constructing atom vectors, we use the
former class. We return instances of the latter class from File
objects so that callers cannot add or remove atoms from the lists.

std::vector<Atom *> is automatically converted to AtomRange.

llvm-svn: 234450

9 years agoclang-cl: Support the /fp options (PR23112)
Hans Wennborg [Wed, 8 Apr 2015 22:55:09 +0000 (22:55 +0000)]
clang-cl: Support the /fp options (PR23112)

This hooks up the /fp options as aliases for -f[no-]fast-math and
-f[no]-trapping-math. It probably doesn't match cl.exe's behaviour
completely (e.g. LLVM is currently never as precise as /fp:precise),
but it's close enough.

Differential revision: http://reviews.llvm.org/D8909

llvm-svn: 234449

9 years ago[WinEH] Don't wrap cleanups in terminate actions
Reid Kleckner [Wed, 8 Apr 2015 22:48:50 +0000 (22:48 +0000)]
[WinEH] Don't wrap cleanups in terminate actions

_CxxFrameHandler3 calls terminate if a cleanup action throws, regardless
of what bits you put in the xdata tables. There's no need to model this
in the IR, since we just have to take it out later.

llvm-svn: 234448

9 years agoReland "[SEH] Implement filter capturing in CodeGen"
Reid Kleckner [Wed, 8 Apr 2015 22:23:48 +0000 (22:23 +0000)]
Reland "[SEH] Implement filter capturing in CodeGen"

The test should be fixed. It was failing in NDEBUG builds due to a
missing '*' character in a regex. In asserts builds, the pattern matched
a single digit value, which became a double digit value in NDEBUG
builds. Go figure.

This reverts commit r234261.

llvm-svn: 234447

9 years ago[LTO] do not run internalize pass from compileOptimized.
Manman Ren [Wed, 8 Apr 2015 22:02:11 +0000 (22:02 +0000)]
[LTO] do not run internalize pass from compileOptimized.

The input to compileOptimized is already optimized and internalized, so remove
internalize pass from compileOptimized.

rdar://20227235

llvm-svn: 234446

9 years agoAdd begin() and end() to atom_collection that returns non-const iterators.
Rui Ueyama [Wed, 8 Apr 2015 21:59:08 +0000 (21:59 +0000)]
Add begin() and end() to atom_collection that returns non-const iterators.

llvm-svn: 234445

9 years agoReplace atom_iterator with a template alias.
Rui Ueyama [Wed, 8 Apr 2015 21:59:06 +0000 (21:59 +0000)]
Replace atom_iterator with a template alias.

llvm-svn: 234444

9 years agoMerge atom_collection_vector with atom_collection.
Rui Ueyama [Wed, 8 Apr 2015 21:59:04 +0000 (21:59 +0000)]
Merge atom_collection_vector with atom_collection.

atom_collection_vector is the only derived class of atom_collection.
This patch merges the two.

llvm-svn: 234443

9 years agoRemove atom_collection_empty class.
Rui Ueyama [Wed, 8 Apr 2015 21:59:00 +0000 (21:59 +0000)]
Remove atom_collection_empty class.

llvm-svn: 234442

9 years agoFix resolution of certain recursive types.
Stephane Sezer [Wed, 8 Apr 2015 21:52:45 +0000 (21:52 +0000)]
Fix resolution of certain recursive types.

Summary:
If a struct type S has a member T that has a member that is a function that
returns a typedef of S* the respective field would be duplicated, which caused
an assert down the line in RecordLayoutBuilder. This patch adds a check that
removes the possibility of trying to resolve the same type twice within the
same callstack.

This commit also adds unit tests for these failures.

Fixes https://llvm.org/bugs/show_bug.cgi?id=20486.

Patch by Cristian Hancila.

Test Plan: Run unit tests.

Reviewers: clayborg spyffe

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D8561

llvm-svn: 234441

9 years ago[Objective-C Sema] Use canonical type of properties when comparing
Fariborz Jahanian [Wed, 8 Apr 2015 21:34:04 +0000 (21:34 +0000)]
[Objective-C Sema] Use canonical type of properties when comparing
redeclaration of property in class extension and to avoid
bogus error. rdar://20469452

llvm-svn: 234440

9 years agoPass -mtriple to llc to appease buildbot.
Akira Hatanaka [Wed, 8 Apr 2015 21:30:48 +0000 (21:30 +0000)]
Pass -mtriple to llc to appease buildbot.

This fixes the test case I committed in r234430.

llvm-svn: 234439

9 years agoFormmatting correction
Andrew Kaylor [Wed, 8 Apr 2015 21:22:46 +0000 (21:22 +0000)]
Formmatting correction

llvm-svn: 234438

9 years agoFix segfault when doing `thread info` on a thread without stop info.
Chaoren Lin [Wed, 8 Apr 2015 21:19:12 +0000 (21:19 +0000)]
Fix segfault when doing `thread info` on a thread without stop info.

Summary:
E.g., if thread 1 hits a breakpoint, then a `thread info` on thread 2 will cause
a segfault, since thread 2 will have no stop info (intended behavior?).

Reviewers: kubabrecka, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D8905

llvm-svn: 234437

9 years agovec.data() and vec.data() + vec.size() are both safe even if the vector is empty.
Rui Ueyama [Wed, 8 Apr 2015 21:13:23 +0000 (21:13 +0000)]
vec.data() and vec.data() + vec.size() are both safe even if the vector is empty.

llvm-svn: 234436

9 years agoYAML: Remove blank class using alias template.
Rui Ueyama [Wed, 8 Apr 2015 21:05:45 +0000 (21:05 +0000)]
YAML: Remove blank class using alias template.

llvm-svn: 234435

9 years agoNative: Remove AtomArray and use atom_collection_vector instead.
Rui Ueyama [Wed, 8 Apr 2015 21:00:33 +0000 (21:00 +0000)]
Native: Remove AtomArray and use atom_collection_vector instead.

llvm-svn: 234434