[lldb] Fix an include in HostTest.cppThe previous include was too broad, and its better if the host tests donot depend on non-host libraries.
[lldb][NFC] Fix all formatting errors in .cpp file headersSummary:A *.cpp file header in LLDB (and in LLDB) should like this:```//===-- TestUtilities.cpp ----------------------------------------
[lldb][NFC] Fix all formatting errors in .cpp file headersSummary:A *.cpp file header in LLDB (and in LLDB) should like this:```//===-- TestUtilities.cpp -------------------------------------------------===//```However in LLDB most of our source files have arbitrary changes to this format andthese changes are spreading through LLDB as folks usually just use the existingsource files as templates for their new files (most notably the unnecessaryeditor language indicator `-*- C++ -*-` is spreading and in every reviewsomeone is pointing out that this is wrong, resulting in people pointing out that thisis done in the same way in other files).This patch removes most of these inconsistencies including the editor language indicators,all the different missing/additional '-' characters, files that center the file name, missingtrailing `===//` (mostly caused by clang-format breaking the line).Reviewers: aprantl, espindola, jfb, shafik, JDevlieghereReviewed By: JDevlieghereSubscribers: dexonsmith, wuzish, emaste, sdardis, nemanjai, kbarton, MaskRay, atanasyan, arphaman, jfb, abidh, jsji, JDevlieghere, usaxena95, lldb-commitsTags: #lldbDifferential Revision: https://reviews.llvm.org/D73258
show more ...
Update the file headers across all of the LLVM projects in the monorepoto reflect the new license.We understand that people may be surprised that we're moving the headerentirely to discuss the ne
Update the file headers across all of the LLVM projects in the monorepoto reflect the new license.We understand that people may be surprised that we're moving the headerentirely to discuss the new license. We checked this carefully with theFoundation's lawyer and we believe this is the correct approach.Essentially, all code in the project is now made available by the LLVMproject under our new license, so you will see that the license headersinclude that license only. Some of our contributors have contributedcode under our old license, and accordingly, we have retained a copy ofour old license notice in the top-level files in each project andrepository.llvm-svn: 351636
[FileSystem] Move path resolution logic out of FileSpecThis patch removes the logic for resolving paths out of FileSpec andupdates call sites to rely on the FileSystem class instead.Differential
[FileSystem] Move path resolution logic out of FileSpecThis patch removes the logic for resolving paths out of FileSpec andupdates call sites to rely on the FileSystem class instead.Differential revision: https://reviews.llvm.org/D53915llvm-svn: 345890
Remove ObjectFile usage from HostLinux::GetProcessInfoSummary:The ObjectFile class was used to determine the architecture of a runningprocess by inspecting it's main executable. There were two is
Remove ObjectFile usage from HostLinux::GetProcessInfoSummary:The ObjectFile class was used to determine the architecture of a runningprocess by inspecting it's main executable. There were two issues withthis:- it's in the wrong layer- the call can be very expensive (it can end up computing the crc of the whole file).Since the process is running on the host, ideally we would be able tojust query the data straight from the OS like darwin does, but theredoesn't seem to be a reasonable way to do that. So, this fixes thelayering issue by using the llvm object library to inspect the file.Since we know the process is already running on the host, we just needto peek at a few bytes of the elf header to determine whether it's 32-or 64-bit (which should make this faster as well).Pretty much the same logic was implemented inNativeProcessProtocol::ResolveProcessArchitecture, so I delete thislogic and replace calls with GetProcessInfo.Reviewers: eugene, krytarowskiSubscribers: mgorny, hintonda, lldb-commitsDifferential Revision: https://reviews.llvm.org/D42488llvm-svn: 323637
Remove some ProcFileReader occurencesSummary:ProcFileReader is the cause of the dependency from Host to ProcessLinuxmodule. Since it's interface is also obsolete (ReadIntoDataBuffer istrivially
Remove some ProcFileReader occurencesSummary:ProcFileReader is the cause of the dependency from Host to ProcessLinuxmodule. Since it's interface is also obsolete (ReadIntoDataBuffer istrivially replaceable by llvm::MemoryBuffer functions andProcessLineByLine is trivially implementable with StringRefs), insteadof moving it around I'm planning to obliterate it. This is the firststep, where I remove a couple of occurences in linux/Host.cpp, andmodernize some code around that.I have introduced linux/Support.h, which holds two utility functionsnow, whose resposibility is to construct the appropriate proc file names-- the only useful feature of ProcFileReader.I add a couple of tests for these functions, and forHost::GetProcessInfo. It's worth noting that these are the firsthost-specific unit tests in lldb.Reviewers: zturner, eugeneSubscribers: srhines, lldb-commits, mgornyDifferential Revision: https://reviews.llvm.org/D30942llvm-svn: 297843