summaryrefslogtreecommitdiffstats
path: root/lldb/source/Initialization
Commit message (Collapse)AuthorAgeFilesLines
* [Reproducer] Use ::rtrim() to remove trailing control characters.Jonas Devlieghere2019-10-181-4/+2
| | | | | | | | Pavel correctly pointed out that removing all control characters from the working directory is overkill. It should be sufficient to just strip the last ones. llvm-svn: 375259
* SystemInitializerCommon fix compilation on linuxPavel Labath2019-10-181-1/+2
| | | | | | | | | | | C++ defines two overloads of std::iscntrl. One in <cctype> and one in <locale>. On linux we seem to include both which makes the std::erase_if call ambiguous. Wrap std::iscntrl call in a lambda to ensure regular overload resolution. llvm-svn: 375221
* [Reproducer] Surface error if setting the cwd failsJonas Devlieghere2019-10-171-2/+7
| | | | | | | Make sure that we surface an error if setting the current working directory fails during replay. llvm-svn: 375146
* [Reproducer] Set the working directory in the VFSJonas Devlieghere2019-10-171-0/+7
| | | | | | | | | Now that the VFS knows how to deal with virtual working directories, we can set the current working directory to the one we recorded during reproducer capture. This ensures that relative paths are resolved correctly during replay. llvm-svn: 375064
* Various build fixes for lldb on MinGWHaibo Huang2019-08-061-0/+1
| | | | | | | | | | Subscribers: mstorsjo, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65691 llvm-svn: 368069
* [Reproducers] Include lldb version in the reproducer rootJonas Devlieghere2019-06-131-1/+3
| | | | | | | | | | | Generally, reproducers are rev-locked to the version of LLDB, so it's valuable to have the LLDB version in the reproducer. For now I just want the information to be present, without enforcing it, but I envision emitting a warning during replay in the future. Differential revision: https://reviews.llvm.org/D63229 llvm-svn: 363225
* [Reproducers] Simplify providers with nested Info struct (NFC)Jonas Devlieghere2019-06-121-1/+1
| | | | | | | | | This replaces the `info` typedef with a nested struct named Info. This means we now have FooProvider and FooProvider::Info, instead of two related but separate classes FooProvider and FooInfo. This change is mostly cosmetic. llvm-svn: 363211
* Initialization: move InstructionEmulation to full initializationSaleem Abdulrasool2019-05-062-14/+0
| | | | | | | | The debug server does not need to use the instruction emulation. This helps reduce the size of the final lldb-server binary by another ~100K (~1% savings). llvm-svn: 360067
* Revert "Initialization: move InstructionEmulation to full initialization"Pavel Labath2019-05-032-0/+14
| | | | | | | This change is bogus. lldb-server definitely uses instruction emulation on some architectures. llvm-svn: 359862
* Initialization: move InstructionEmulation to full initializationSaleem Abdulrasool2019-05-022-14/+0
| | | | | | | The debug server does not need to use the instruction emulation. This helps reduce the size of the final lldb-server binary by another ~100K (~1% savings). llvm-svn: 359832
* Initialization: correct macro usageSaleem Abdulrasool2019-05-021-4/+4
| | | | | | | `_MSC_VER` indiciates that you are building with MSVC, not that you are building for Windows. Use `_WIN32` (which identifies Win32 and Win64). llvm-svn: 359817
* Initialization: remove ObjectContainer from CommonSaleem Abdulrasool2019-05-022-13/+0
| | | | | | | | | This restructures the initialization path to move the ObjectContainer initialization into the *full* initialization path. This is not needed for the lldb-server initialization path. This helps strip off ~1MiB from the binary. llvm-svn: 359810
* [NFC] Remove ASCII lines from commentsJonas Devlieghere2019-04-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | A lot of comments in LLDB are surrounded by an ASCII line to delimit the begging and end of the comment. Its use is not really consistent across the code base, sometimes the lines are longer, sometimes they are shorter and sometimes they are omitted. Furthermore, it looks kind of weird with the 80 column limit, where the comment actually extends past the line, but not by much. Furthermore, when /// is used for Doxygen comments, it looks particularly odd. And when // is used, it incorrectly gives the impression that it's actually a Doxygen comment. I assume these lines were added to improve distinguishing between comments and code. However, given that todays editors and IDEs do a great job at highlighting comments, I think it's worth to drop this for the sake of consistency. The alternative is fixing all the inconsistencies, which would create a lot more churn. Differential revision: https://reviews.llvm.org/D60508 llvm-svn: 358135
* [lldb-server] Introduce Socket::Initialize and Terminate to simply WSASocket ↵Aaron Smith2019-04-101-0/+7
| | | | | | | | | | | | | | | | setup Reviewers: zturner, labath Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D60440 llvm-svn: 358044
* [Reproducers] Initialize reproducers before initializing the debugger.Jonas Devlieghere2019-02-212-13/+9
| | | | | | | | | | | | | | | | As per the discussion on the mailing list: http://lists.llvm.org/pipermail/lldb-commits/Week-of-Mon-20190218/048007.html This commit implements option (3): > Go back to initializing the reproducer before the rest of the debugger. > The method wouldn't be instrumented and guarantee no other SB methods are > called or SB objects are constructed. The initialization then becomes part > of the replay. Differential revision: https://reviews.llvm.org/D58410 llvm-svn: 354631
* [Reproducers] Add file providerJonas Devlieghere2019-01-291-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the file provider which is responsible for capturing files used by LLDB. When capturing a reproducer, we use a file collector that is very similar to the one used in clang. For every file that we touch, we add an entry with a mapping from its virtual to its real path. When we decide to generate a reproducer we copy over the files and their permission into to reproducer folder. When replaying a reproducer, we load the VFS mapping and instantiate a RedirectingFileSystem. The latter will transparently use the files available in the reproducer. I've tested this on two macOS machines with an artificial example. Still, it is very likely that I missed some places where we (still) use native file system calls. I'm hoping to flesh those out while testing with more advanced examples. However, I will fix those things in separate patches. Differential revision: https://reviews.llvm.org/D54617 llvm-svn: 352538
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-193-12/+9
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [Reproducers] Change how reproducers are initialized.Jonas Devlieghere2018-12-032-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the way the reproducer is initialized. Rather than making changes at run time we now do everything at initialization time. To make this happen we had to introduce initializer options and their SB variant. This allows us to tell the initializer that we're running in reproducer capture/replay mode. Because of this change we also had to alter our testing strategy. We cannot reinitialize LLDB when using the dotest infrastructure. Instead we use lit and invoke two instances of the driver. Another consequence is that we can no longer enable capture or replay through commands. This was bound to go away form the beginning, but I had something in mind where you could enable/disable specific providers. However this seems like it adds very little value right now so the corresponding commands were removed. Finally this change also means you now have to control this through the driver, for which I replaced --reproducer with --capture and --replay to differentiate between the two modes. Differential revision: https://reviews.llvm.org/D55038 llvm-svn: 348152
* [FileSystem] Extend file system and have it use the VFS.Jonas Devlieghere2018-10-311-0/+3
| | | | | | | | | | | | | | | | This patch extends the FileSystem class with a bunch of functions that are currently implemented as methods of the FileSpec class. These methods will be removed in future commits and replaced by calls to the file system. The new functions are operated in terms of the virtual file system which was recently moved from clang into LLVM so it could be reused in lldb. Because the VFS is stateful, we turned the FileSystem class into a singleton. Differential revision: https://reviews.llvm.org/D53532 llvm-svn: 345783
* Move pretty stack trace printer into driver.Jonas Devlieghere2018-07-171-4/+0
| | | | | | | | | | | | We used to have a pretty stack trace printer in SystemInitializerCommon. This was disabled on Apple because we didn't want the library to be setting signal handlers, as this was causing issues when loaded into Xcode. However, I think it's useful to have this for the LLDB driver, so I moved it up to use the PrettyStackTraceProgram in the driver's main. Differential revision: https://reviews.llvm.org/D49377 llvm-svn: 337261
* Move ObjectFile initialization out of SystemInitializerCommonPavel Labath2018-05-242-12/+0
| | | | | | | | | | | | | | | | | | | | | | Summary: For lldb-server, it is sufficient to parse only the native object file format for its target OS (no other file can be loaded into a running process). This moves the object file initialization code into specific initializer classes: lldb-test and liblldb get all object files; lldb-server gets only one of them. For this to work, I've needed to create a special SystemInitializer for use in lldb-server, instead of it calling directly into the common one. This reduces the size of lldb-server by about 2%, which is not earth-shattering, but it's an easy win, and it helps. Reviewers: zturner, clayborg Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D47250 llvm-svn: 333182
* Make ObjectFileMachO work on non-darwin platformsPavel Labath2018-05-182-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Before this patch we were unable to write cross-platform MachO tests because the parsing code did not compile on other platforms. The reason for that was that ObjectFileMachO depended on RegisterContextDarwin_arm(64)? (presumably for core file parsing) and the two Register Context classes uses constants from the system headers (KERN_SUCCESS, KERN_INVALID_ARGUMENT). As far as I can tell, these two files don't actually interact with the darwin kernel -- they are used only in ObjectFileMachO and MacOSX-Kernel process plugin (even though it has "kernel" in the name, this one communicates with it via network packets and not syscalls). For the time being I have created OS-independent definitions of these constants and made the register context classes use those. Long term, the error handling in these classes should be probably changed to use more standard mechanisms such as Status or Error classes. This is the only change necessary (apart from build system glue) to make ObjectFileMachO work on other platforms. To demonstrate that, I remove REQUIRES:darwin from our (only) cross-platform mach-o test. Reviewers: jasonmolenda, aprantl, clayborg, javed.absar Subscribers: mgorny, lldb-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D46934 llvm-svn: 332702
* Don't use llvm::EnablePrettyStackTrace on macOS.Jim Ingham2017-12-021-0/+2
| | | | | | | | | | | | | | | | | LLDB.framework gets loaded into Xcode and other frameworks, and this is inserting a signal handler into the process even when lldb isn't used. I have a bunch of reports of this SignalHandler blowing out the stack, which renders crash reports for the crash useless. And in any case libraries really shouldn't be installing signal handlers. I only turned this off for APPLE platforms, I'll let the maintainers of other platforms decide what policy they want to have w.r.t. this. llvm-svn: 319598
* Logging: Disable logging after fork()Pavel Labath2017-10-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: We had a bug where if we had forked (in the ProcessLauncherPosixFork) while another thread was writing a log message, we would deadlock. This happened because the fork child inherited the locked log rwmutex, which would never get unlocked. This meant the child got stuck trying to disable all log channels. The bug existed for a while but only started being apparent after D37930, which started using ThreadLauncher (which uses logging) instead of std::thread (which does not) for launching TaskPool threads. The fix is to use pthread_atfork to disable logging in the forked child. Reviewers: zturner, eugene, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D38938 llvm-svn: 316368
* Revert "Logging: Make sure logging machinery is in a consistent state after ↵Pavel Labath2017-10-201-1/+1
| | | | | | | | | | | | | | forking" The pthread_atfork trick breaks on android, because pthread_rwlock_unlock detects that it is not the same thread which locked the lock. This means that the subsequent lock attempt will still deadlock (only this time it happens deterministically instead of at random). Reverting to find a better solution. This reverts commit r316173. llvm-svn: 316231
* Logging: Make sure logging machinery is in a consistent state after forkingPavel Labath2017-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Summary: We had a bug where if we had forked (in the ProcessLauncherPosixFork) while another thread was writing a log message, we would deadlock. This happened because the fork child inherited the locked log rwmutex, which would never get unlocked. This meant the child got stuck trying to disable all log channels. The bug existed for a while but only started being apparent after D37930, which started using ThreadLauncher (which uses logging) instead of std::thread (which does not) for launching TaskPool threads. The fix is to use pthread_atfork to make sure noone is writing a log message while we are forking. Reviewers: zturner, eugene, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D38938 llvm-svn: 316173
* Move Timer and TraceOptions from Core to UtilityPavel Labath2017-06-291-1/+1
| | | | | | | | | | | | | | Summary: The classes have no dependencies, and they are used both by lldb and lldb-server, so it makes sense for them to live in the lowest layers. Reviewers: zturner, jingham Subscribers: emaste, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D34746 llvm-svn: 306682
* Remove an expensive lock from TimerPavel Labath2017-05-151-2/+4
| | | | | | | | | | | | | The Timer destructor would grab a global mutex in order to update execution time. Add a class to define a category once, statically; the class adds itself to an atomic singly linked list, and thus subsequent updates only need to use an atomic rather than grab a lock and perform a hashtable lookup. Differential Revision: https://reviews.llvm.org/D32823 Patch by Scott Smith <scott.smith@purestorage.com>. llvm-svn: 303058
* Enable ProcessPOSIXLog on NetBSDKamil Rytarowski2017-03-211-2/+2
| | | | | | | | | | | | | | | | | | | | Summary: NetBSD can share the same logging functionality with Linux and FreeBSD. Sponsored by <The NetBSD Foundation> Reviewers: labath, emaste, joerg, kettenis Reviewed By: labath, emaste Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D31191 llvm-svn: 298406
* Remove lldb streams from the Log class completelyPavel Labath2017-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | Summary: previously we switched to llvm streams for log output, this completes the switch for the error streams. I also clean up the includes and remove the unused argument from DisableAllLogChannels(). This required adding a bit of boiler plate to convert the output in the command interpreter, but that should go away when we switch command results to use llvm streams as well. Reviewers: zturner, eugene Subscribers: lldb-commits, emaste Differential Revision: https://reviews.llvm.org/D30894 llvm-svn: 297812
* Move Log from Core -> Utility.Zachary Turner2017-03-031-1/+1
| | | | | | | | | All references to Host and Core have been removed, so this class can now safely be lowered into Utility. Differential Revision: https://reviews.llvm.org/D30559 llvm-svn: 296909
* Switch "posix" to the new log channel registration mechanismPavel Labath2017-02-231-4/+3
| | | | | | | | | | | | | | | | | | Summary: This also removes magic rename code, which caused the channel to be called "linux" when built on a linux machine, and "freebsd" when built on a freebsd one, which seems unnecessary - registering a new channel is sufficiently simple now that if we wish to log something extremely os-specific, we can just create a new channel. None of the current categories seem very specific to one OS or another. Reviewers: emaste, krytarowski Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D30250 llvm-svn: 295954
* Switch "lldb" log channel to the new registration mechanismPavel Labath2017-02-221-2/+2
| | | | llvm-svn: 295823
* [CMake] Final dependency cleanup patch!Chris Bieneman2017-02-081-5/+2
| | | | | | | | | | | | | | | | | Summary: This patch removes the over-specified dependencies from LLDBDependencies and instead relies on the dependencies as expressed in each library and tool. This also removes the library looping in favor of allowing CMake to do its thing. I've tested this patch on Darwin, and found no issues, but since linker semantics vary by system I'll also work on testing it on other platforms too. Help testing would be greatly appreciated. Reviewers: labath, zturner Subscribers: danalbert, srhines, mgorny, jgosnell, lldb-commits Differential Revision: https://reviews.llvm.org/D29352 llvm-svn: 294515
* [CMake] Add accurate dependency specificationsChris Bieneman2017-01-311-0/+31
| | | | | | | | | | | | | | | | | Summary: This patch adds accurate dependency specifications to the mail LLDB libraries and tools. In all cases except lldb-server, these dependencies are added in addition to existing dependencies (making this low risk), and I performed some code cleanup along the way. For lldb-server I've cleaned up the LLVM dependencies down to just the minimum actually required. This is more than lldb-server actually directly references, and I've left a todo in the code to clean that up. Reviewers: labath, zturner Subscribers: lldb-commits, danalbert, srhines, ki.stfu, mgorny, jgosnell Differential Revision: https://reviews.llvm.org/D29333 llvm-svn: 293686
* Adopt PrettyStackTrace in LLDBSean Callanan2016-12-141-8/+2
| | | | | | | | | | LLDB needs some minor changes to adopt PrettyStackTrace after https://reviews.llvm.org/D27683. We remove our own SetCrashDescription() function and use LLVM-provided RAII objects instead. We also make sure LLDB doesn't define __crashtracer_info__ which would collide with LLVM's definition. Differential Revision: https://reviews.llvm.org/D27735 llvm-svn: 289711
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-063-107/+92
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Delete Host/windows/win32.hZachary Turner2016-08-091-2/+2
| | | | | | | | | | | | | | | | | | | It's always hard to remember when to include this file, and when you do include it it's hard to remember what preprocessor check it needs to be behind, and then you further have to remember whether it's windows.h or win32.h which you need to include. This patch changes the name to PosixApi.h, which is more appropriately named, and makes it independent of any preprocessor setting. There's still the issue of people not knowing when to include this, because there's not a well-defined set of things it exposes other than "whatever is missing on Windows", but at least this should make it less painful to fix when problems arise. This patch depends on LLVM revision r278170. llvm-svn: 278177
* Remove platform plugins from lldb-serverPavel Labath2016-06-291-31/+1
| | | | | | | | | | | | | | | | | | | Summary: This removes the last usage of Platform plugins in lldb-server -- it was used for launching child processes, where it can be trivially replaced by Host::LaunchProces (as lldb-server is always running on the host). Removing platform plugins enables us to remove a lot of other unused code, which was pulled in as a transitive dependency, and it reduces lldb-server size by 4%--9% (depending on build type and architecture). Reviewers: clayborg Subscribers: tberghammer, danalbert, srhines, lldb-commits Differential Revision: http://reviews.llvm.org/D20440 llvm-svn: 274125
* remove use of Mutex in favour of std::{,recursive_}mutexSaleem Abdulrasool2016-05-181-6/+3
| | | | | | | | | | This is a pretty straightforward first pass over removing a number of uses of Mutex in favor of std::mutex or std::recursive_mutex. The problem is that there are interfaces which take Mutex::Locker & to lock internal locks. This patch cleans up most of the easy cases. The only non-trivial change is in CommandObjectTarget.cpp where a Mutex::Locker was split into two. llvm-svn: 269877
* Remove ASTContexts from SystemInitializerCommonPavel Labath2016-05-131-8/+0
| | | | | | | | | | | | | | | | | | Summary: The AST contexts are not needed in the server components, and the clang context in particular pulls in large parts of clang into the binary. Simply removing these two calls reduces the lldb-server size by about 50%--80%, depending on the architecture and build type. This should not impact the client parts as the same calls are already present in SystemInitializerFull. Reviewers: tberghammer, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20236 llvm-svn: 269416
* Move DynamicLoader plugins to SystemInitializerFullPavel Labath2016-03-291-12/+0
| | | | | | | | | | | | Summary: These are not needed by lldb-server. Removing them shrinks the server by about 0.5%. Reviewers: zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D18206 llvm-svn: 264735
* Move OperatingSystem plugins to SystemInitializerFullPavel Labath2016-03-161-11/+0
| | | | | | | | | | | | Summary: These are not needed in lldb-server. Removing them shrinks the server size by about 1.5%. Reviewers: zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D18188 llvm-svn: 263625
* Add support for reading line tables from PDB files.Zachary Turner2016-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | PDB is Microsoft's debug information format, and although we cannot yet generate it, we still must be able to consume it. Reason for this is that debug information for system libraries (e.g. kernel32, C Runtime Library, etc) only have debug info in PDB format, so in order to be able to support debugging of system code, we must support it. Currently this code should compile on every platform, but on non-Windows platforms the PDB plugin will return 0 capabilities, meaning that for now PDB is only supported on Windows. This may change in the future, but the API is designed in such a way that this will require few (if any) changes on the LLDB side. In the future we can just flip a switch and everything will work. This patch only adds support for line tables. It does not return information about functions, types, global variables, or anything else. This functionality will be added in a followup patch. Differential Revision: http://reviews.llvm.org/D17363 Reviewed by: Greg Clayton llvm-svn: 262528
* Don't use an atexit handler for cleaning up the temp directory.Zachary Turner2016-02-191-0/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D17420 llvm-svn: 261353
* Remove Timer::Initialize routinePavel Labath2016-02-011-1/+0
| | | | | | | | | | | | | | | | | | | | Summary: I've run into an issue when running unit tests, where the underlying problem turned out to be that we were creating Timer objects (through several layers of indirection) without calling Timer::Initialize. Since Timer's thread-local storage was not properly initialized, we were overwriting gtest's own thread-local storage, causing test failures. Instead of requiring that every test calls Timer::Initialize(), I remove the function altogether: The thread-local storage can be initialized on-demand, and the g_file variable initialized to stdout and never changed, so I have simply removed it. Reviewers: clayborg, zturner, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D16722 llvm-svn: 259356
* Remove autoconf support from source directories.Eugene Zelenko2016-01-281-14/+0
| | | | | | Differential revision: http://reviews.llvm.org/D16662 llvm-svn: 259098
* Plug-in PlatformNetBSD initializer and terminatorKamil Rytarowski2015-12-051-0/+2
| | | | | | | | | | | | Summary: Other platform parts needed to build this code are already merged. Reviewers: emaste, clayborg Subscribers: joerg, lldb-commits Differential Revision: http://reviews.llvm.org/D15066 llvm-svn: 254865
* Revert "Plug-in PlatformNetBSD initializer and terminator"Siva Chandra2015-11-191-2/+0
| | | | | | | | | | | | | | Summary: This reverts commit 2354cd73101e58540b8b39783df462d06023309f as it introduced a bunch regressions on the linux bot. Reviewers: emaste, krytarowski Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14844 llvm-svn: 253615
* Plug-in PlatformNetBSD initializer and terminatorEd Maste2015-11-191-0/+2
| | | | | | | | Patch by Kamil Rytarowski Differential Revision: http://reviews.llvm.org/D14530 llvm-svn: 253601
OpenPOWER on IntegriCloud