summaryrefslogtreecommitdiffstats
path: root/llvm/unittests
Commit message (Collapse)AuthorAgeFilesLines
...
* [test] Silence gcc 7.4 warning [NFC]Mikael Holmen2019-07-111-1/+1
| | | | | | | | | Without this gcc 7.4.0 complains with ../unittests/Analysis/ValueTrackingTest.cpp:937:66: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror] ::testing::ValuesIn(IsBytewiseValueTests)); ^ llvm-svn: 365738
* Add IsBytewiseValue unit testVitaly Buka2019-07-101-11/+268
| | | | | | | | | | Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63966 llvm-svn: 365710
* Recommit "[CommandLine] Remove OptionCategory and SubCommand caches from the ↵Don Hinton2019-07-101-22/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | Option class." Previously reverted in 364141 due to buildbot breakage, and fixed here by making GeneralCategory global a ManagedStatic. Summary: This change processes `OptionCategory`s and `SubCommand`s as they are seen instead of caching them in the Option class and processing them later. Doing so simplifies the work needed to be done by the Global parser and significantly reduces the size of the Option class to a mere 64 bytes. Removing the `OptionCategory` cache saved 24 bytes, and removing the `SubCommand` cache saved an additional 48 bytes, for a total of a 72 byte reduction. Reviewed By: serge-sans-paille Tags: #llvm, #clang Differential Revision: https://reviews.llvm.org/D62105 llvm-svn: 365675
* [PatternMatch] Generalize m_SpecificInt_ULT() to take ICmpInst::PredicateRoman Lebedev2019-07-101-9/+378
| | | | | | | As discussed in the original review, this may be useful, so let's just do it. llvm-svn: 365652
* [FileCheck] Use bool operator to test ExpectedThomas Preud'homme2019-07-101-24/+24
| | | | | | | | | Use bool() consistently to get boolean value of Error, Optional and Expected types in EXPECT calls. While static_cast is used in all cases but one, bool provides more clarity and makes more sense as a new default. llvm-svn: 365644
* [FileCheck] Simplify numeric variable interfaceThomas Preud'homme2019-07-101-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch simplifies 2 aspects in the FileCheckNumericVariable code. First, setValue() method is turned into a void function since being called only on undefined variable is an invariant and is now asserted rather than returned. This remove the assert from the callers. Second, clearValue() method is also turned into a void function since the only caller does not check its return value since it may be trying to clear the value of variable that is already cleared without this being noteworthy. Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D64231 > llvm-svn: 365249 llvm-svn: 365625
* [FileCheck] Fix @LINE value after match failureThomas Preud'homme2019-07-101-0/+15
| | | | | | | | | | | | | | | | | | | | Summary: The value of the FileCheckNumericVariable class instance representing the @LINE numeric variable is set and cleared respectively before and after substitutions are made, if any. However, when a substitution fails, the value is not cleared. This causes the next substitution of @LINE later on to give the wrong value since setValue is a nop if the value is already set. This is what caused failures after commit r365249. Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield Tags: #llvm Differential Revision: https://reviews.llvm.org/D64449 llvm-svn: 365624
* [Support] Move llvm::MemoryBuffer to sys::fs::file_tReid Kleckner2019-07-103-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: On Windows, Posix integer file descriptors are a compatibility layer over native file handles provided by the C runtime. There is a hard limit on the maximum number of file descriptors that a process can open, and the limit is 8192. LLD typically doesn't run into this limit because it opens input files, maps them into memory, and then immediately closes the file descriptor. This prevents it from running out of FDs. For various reasons, I'd like to open handles to every input file and keep them open during linking. That requires migrating MemoryBuffer over to taking open native file handles instead of integer FDs. Reviewers: aganea, Bigcheese Reviewed By: aganea Subscribers: smeenai, silvas, mehdi_amini, hiraditya, steven_wu, dexonsmith, dang, llvm-commits, zturner Tags: #llvm Differential Revision: https://reviews.llvm.org/D63453 llvm-svn: 365588
* [Profile] Support raw/indexed profiles larger than 4GBVedant Kumar2019-07-091-0/+21
| | | | | | rdar://45955976 llvm-svn: 365565
* [unittest] Add the missing bogus machine register info initialization.Michael Liao2019-07-091-1/+4
| | | | llvm-svn: 365529
* [unittest] Add bogus register info.Michael Liao2019-07-091-0/+52
| | | | | | | | | | | | Reviewers: dstenb Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64421 llvm-svn: 365516
* [ADT] Remove MSVC-only "no two-phase name lookup" typename path.Simon Pilgrim2019-07-091-9/+0
| | | | | | Now that we've dropped VS2015 support (D64326) we can use the regular codepath as VS2017+ correctly handles it llvm-svn: 365502
* OpaquePtr: pass type to CreateLoad. NFC.Tim Northover2019-07-091-1/+1
| | | | | | | This is the one place in LLVM itself that used the deprecated API for CreateLoad, so I just added the type in. llvm-svn: 365472
* [ADT] Enable ArrayRef/StringRef is_assignable tests on MSVCSimon Pilgrim2019-07-092-11/+0
| | | | | | Now that we've dropped VS2015 support (D64326) we can enable these static_asserts on MSVC builds as VS2017+ correctly handles them llvm-svn: 365471
* Prepare for making SwitchInstProfUpdateWrapper strictYevgeny Rouban2019-07-091-38/+0
| | | | | | | | | | | | This patch removes the test part that relates to the non-strict behavior of SwitchInstProfUpdateWrapper and changes the assertion to llvm_unreachable() to allow the check in release builds. This patch prepares SwitchInstProfUpdateWrapper to become strict with one line change. That is need to revert it easily if any failure will arise. llvm-svn: 365439
* Standardize on MSVC behavior for triples with no environmentReid Kleckner2019-07-081-0/+2
| | | | | | | | | | | | | | | | | | | | | Summary: This makes it so that IR files using triples without an environment work out of the box, without normalizing them. Typically, the MSVC behavior is more desirable. For example, it tends to enable things like constant merging, use of associative comdats, etc. Addresses PR42491 Reviewers: compnerd Subscribers: hiraditya, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64109 llvm-svn: 365387
* Keep the order of the basic blocks in the cloned loop as the originalWhitney Tsang2019-07-081-0/+87
| | | | | | | | | | | | | | loop Summary: Do the cloning in two steps, first allocate all the new loops, then clone the basic blocks in the same order as the original loop. Reviewer: Meinersbur, fhahn, kbarton, hfinkel Reviewed By: hfinkel Subscribers: hfinkel, hiraditya, llvm-commits Tag: https://reviews.llvm.org/D64224 Differential Revision: llvm-svn: 365366
* [SCEV] Fix for PR42397. SCEVExpander wrongly adds nsw to shl instruction.Denis Bakhvalov2019-07-081-0/+41
| | | | | Change-Id: I76c9f628c092ae3e6e78ebdaf55cec726e25d692 llvm-svn: 365363
* Teach the IRBuilder about fadd and friends.Kevin P. Neal2019-07-081-0/+64
| | | | | | | | | | | | The IRBuilder has calls to create floating point instructions like fadd. It does not have calls to create constrained versions of them. This patch adds support for constrained creation of fadd, fsub, fmul, fdiv, and frem. Reviewed by: John McCall, Sanjay Patel Approved by: John McCall Differential Revision: https://reviews.llvm.org/D53157 llvm-svn: 365339
* [Triple] Add isRISCV functionAlex Bradbury2019-07-081-0/+2
| | | | | | | | | | | | This matches isARM, isThumb, isAArch64 and similar helpers. Future commits which clean-up code that currently checks for Triple::riscv32 || Triple::riscv64. Differential Revision: https://reviews.llvm.org/D54215 Patch by Simon Cook. Test case added by Alex Bradbury. llvm-svn: 365327
* GlobalISel: widenScalar for G_BUILD_VECTORMatt Arsenault2019-07-081-0/+47
| | | | llvm-svn: 365320
* Revert "[FileCheck] Simplify numeric variable interface"Michael Liao2019-07-051-6/+11
| | | | | | This reverts commit 096600a4b073dd94a366cc8e57bff93c34ff6966. llvm-svn: 365251
* [FileCheck] Simplify numeric variable interfaceThomas Preud'homme2019-07-051-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch simplifies 2 aspects in the FileCheckNumericVariable code. First, setValue() method is turned into a void function since being called only on undefined variable is an invariant and is now asserted rather than returned. This remove the assert from the callers. Second, clearValue() method is also turned into a void function since the only caller does not check its return value since it may be trying to clear the value of variable that is already cleared without this being noteworthy. Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D64231 llvm-svn: 365249
* [CodeGen] Enhance `MachineInstrSpan` to allow the end of MBB to be used.Michael Liao2019-07-051-0/+33
| | | | | | | | | | | | | | | | Summary: - Explicitly specify the parent MBB to allow the end iterator to be used. Reviewers: aprantl, MatzeB, craig.topper, qcolombet Subscribers: arsenm, jvesely, nhaehnle, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64261 llvm-svn: 365240
* [FileCheck] Share variable instance among usesThomas Preud'homme2019-07-051-2/+3
| | | | | | | | | | | | | | | | | | | | Summary: This patch changes expression support to use one instance of FileCheckNumericVariable per numeric variable rather than one per variable and per definition. The current system was only necessary for the last patch of the numeric expression support patch series in order to handle a line using a variable defined earlier on the same line from the input text. However this can be dealt more efficiently. Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D64229 llvm-svn: 365220
* [FileCheck] Don't diagnose undef vars at parse timeThomas Preud'homme2019-07-051-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Diagnosing use of undefined variables takes place in parseNumericVariableUse() and printSubstitutions() for numeric variables but only takes place in printSubstitutions() for string variables. The reason for the split location of diagnostics is that parsing is not aware of the clearing of variables due to --enable-var-scope and thus use of variables cleared in this way can only be catched by printSubstitutions(). Beyond the code level inconsistency, there is also a user facing inconsistency since diagnostics look different between the two functions. While the diagnostic in printSubstitutions is more verbose, doing the diagnostic there allows to diagnose all undefined variables rather than just the first one and error out. This patch create dummy variable definition when encountering a use of undefined variable so that parsing can proceed and be diagnosed by printSubstitutions() later. Tests that were testing whether parsing fails in such case are thus modified accordingly. Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D64228 llvm-svn: 365219
* Scalable Vector IR Type with further LTO fixesGraham Hunter2019-07-052-0/+165
| | | | | | | | | | | | | | | | | Reintroduces the scalable vector IR type from D32530, after it was reverted a couple of times due to increasing chromium LTO build times. This latest incarnation removes the walk over aggregate types from the verifier entirely, in favor of rejecting scalable vectors in the isValidElementType methods in ArrayType and StructType. This removes the 70% degradation observed with the second repro tarball from PR42210. Reviewers: thakis, hans, rengolin, sdesmalen Reviewed By: sdesmalen Differential Revision: https://reviews.llvm.org/D64079 llvm-svn: 365203
* [Remarks] Require an explicit format to the parserFrancis Visoiu Mistrih2019-07-041-5/+5
| | | | | | | | | Make the parser require an explicit format. This allows new formats to be easily added by following YAML as an example. llvm-svn: 365102
* [Remarks][NFC] Move the string table parsing out of the parser constructorFrancis Visoiu Mistrih2019-07-041-2/+4
| | | | | | Make the parser take an already-parsed string table. llvm-svn: 365101
* [Bitcode] Move Bitstream to a separate libraryFrancis Visoiu Mistrih2019-07-035-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | This moves Bitcode/Bitstream*, Bitcode/BitCodes.h to Bitstream/. This is needed to avoid a circular dependency when using the bitstream code for parsing optimization remarks. Since Bitcode uses Core for the IR part: libLLVMRemarks -> Bitcode -> Core and Core uses libLLVMRemarks to generate remarks (see IR/RemarkStreamer.cpp): Core -> libLLVMRemarks we need to separate the Bitstream and Bitcode part. For clang-doc, it seems that it doesn't need the whole bitcode layer, so I updated the CMake to only use the bitstream part. Differential Revision: https://reviews.llvm.org/D63899 llvm-svn: 365091
* [triple] Use 'macabi' environment name for the Mac Catalyst triplesAlex Lorenz2019-07-031-2/+2
| | | | | | The 'macabi' environment name is preferred instead of 'maccatalyst'. llvm-svn: 364988
* [VFS] Add reverse iterator to OverlayFileSystemJonas Devlieghere2019-07-031-0/+51
| | | | | | | | | | Add a reverse iterator to the overlay file system. This makes it possible to take overlays from one OverlayFileSystem, and add them to another. Differential revision: https://reviews.llvm.org/D64113 llvm-svn: 364986
* [triple] add 'macCatalyst' environment typeAlex Lorenz2019-07-021-0/+11
| | | | | | | | Mac Catalyst is a new deployment platform in macOS Catalina. Differential Revision: https://reviews.llvm.org/D64097 llvm-svn: 364971
* [APIntTest] multiplicativeInverse(): clarify testRoman Lebedev2019-07-021-4/+7
| | | | | | | Clarify that multiplicative inverse exists for all odd numbers, and does not exist for all even numbers (including 0). llvm-svn: 364920
* GlobalISel: Implement lower for min/maxMatt Arsenault2019-07-011-0/+78
| | | | llvm-svn: 364816
* Cleanup: llvm::bsearch -> llvm::partition_point after r364719Fangrui Song2019-06-301-4/+5
| | | | llvm-svn: 364720
* [ADT] Implement llvm::bsearch() with std::partition_point()Fangrui Song2019-06-301-12/+0
| | | | | | | | | | | | | | | | | | | Summary: Delete the begin-end form because the standard std::partition_point can be easily used as a replacement. The ranges-style llvm::bsearch will be renamed to llvm::partition_point in the next clean-up patch. The name "bsearch" doesn't meet people's expectation because in C: > If two or more members compare equal, which member is returned is unspecified. Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D63718 llvm-svn: 364719
* [IR][Patternmatch] Add m_SpecificInt_ULT() predicateRoman Lebedev2019-06-291-0/+21
| | | | | | | | | | | | | | | | | | | | Summary: Match an integer or vector with every element unsigned less than the Threshold. For vectors, this includes constants with undefined elements. FIXME: is it worth generalizing this to simply take ICmpInst::Predicate? Reviewers: craig.topper, spatel, nikic Reviewed By: spatel Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63811 llvm-svn: 364711
* [APInt] Fix getBitsNeeded for INT_MIN valuesDmitry Venikov2019-06-291-2/+15
| | | | | | | | | | | | | | | | Summary: This patch fixes behaviour of APInt::getBitsNeeded for INT_MIN 10 bits values. Reviewers: regehr, RKSimon Reviewed By: RKSimon Subscribers: grandinj, dexonsmith, kristina, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63691 llvm-svn: 364710
* [unittests][Support] Fix LLVM-Unit :: ↵Rainer Orth2019-06-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support/./SupportTests/FileSystemTest.permissions on Solaris LLVM-Unit :: Support/./SupportTests/FileSystemTest.permissions currently FAILs on Solaris: FAIL: LLVM-Unit :: Support/./SupportTests/FileSystemTest.permissions (2940 of 51555) ******************** TEST 'LLVM-Unit :: Support/./SupportTests/FileSystemTest.permissions' FAILED ******************** Note: Google Test filter = FileSystemTest.permissions [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from FileSystemTest [ RUN ] FileSystemTest.permissions /opt/llvm-buildbot/obj/llvm/llvm.src/unittests/Support/Path.cpp:1705: Failure Value of: CheckPermissions(fs::sticky_bit) Actual: false Expected: true /opt/llvm-buildbot/obj/llvm/llvm.src/unittests/Support/Path.cpp:1712: Failure Value of: CheckPermissions(fs::set_uid_on_exe | fs::set_gid_on_exe | fs::sticky_bit) Actual: false Expected: true /opt/llvm-buildbot/obj/llvm/llvm.src/unittests/Support/Path.cpp:1719: Failure Value of: CheckPermissions(fs::all_read | fs::set_uid_on_exe | fs::set_gid_on_exe | fs::sticky_bit) Actual: false Expected: true /opt/llvm-buildbot/obj/llvm/llvm.src/unittests/Support/Path.cpp:1722: Failure Value of: CheckPermissions(fs::all_perms) Actual: false Expected: true [ FAILED ] FileSystemTest.permissions (0 ms) [----------] 1 test from FileSystemTest (0 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (1 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] FileSystemTest.permissions 1 FAILED TEST Checking with truss reveals that this is the same issue as on AIX and documented in chmod(2): If the process is not a privileged process and the file is not a direc- tory, mode bit 01000 (S_ISVTX, the sticky bit) is cleared. The following patch fixes this in the same way. Tested on amd64-pc-solaris2.11. Differential Revision: https://reviews.llvm.org/D63598 llvm-svn: 364671
* [DebugInfo] Simplify GSYM::AddressRange and GSYM::AddressRangesFangrui Song2019-06-281-26/+21
| | | | | | | | | | Delete unnecessary getters of AddressRange. Simplify AddressRange::size(): Start <= End check should be checked in an upper layer. Delete isContiguousWith() that doesn't make sense. Simplify AddressRanges::insert. Delete commented code. Fix it when more than 1 ranges are to be deleted. Delete trailing newline. llvm-svn: 364637
* [DebugInfo] GSYM cleanups after D63104/r364427Fangrui Song2019-06-282-56/+47
| | | | llvm-svn: 364634
* Silence gcc warning in testcase [NFC]Mikael Holmen2019-06-281-1/+1
| | | | | | | | | | | Without the fix gcc (7.4.0) complains with ../unittests/ADT/APIntTest.cpp: In member function 'virtual void {anonymous}::APIntTest_MultiplicativeInverseExaustive_Test::TestBody()': ../unittests/ADT/APIntTest.cpp:2510:36: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] for (unsigned Value = 0; Value < (1 << BitWidth); ++Value) { ~~~~~~^~~~~~~~~~~~~~~~~ llvm-svn: 364624
* [Support] Fix add fs::getUmask() patchAlex Brachet2019-06-281-2/+2
| | | | llvm-svn: 364622
* [Support] Add fs::getUmask() function and change fs::setPermissionsAlex Brachet2019-06-281-0/+53
| | | | | | | | | | | | | | | | Summary: This patch changes fs::setPermissions to optionally set permissions while respecting the umask. It also adds the function fs::getUmask() which returns the current umask. Reviewers: jhenderson, rupprecht, aprantl, lhames Reviewed By: jhenderson, rupprecht Subscribers: sanaanajjar231288, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63583 llvm-svn: 364621
* [NFC][APInt] Add (exhaustive) test for multiplicativeInverse()Roman Lebedev2019-06-271-0/+17
| | | | | | | Else there is no direct test coverage at all. The function should either return '0' or precise answer. llvm-svn: 364599
* Use "willreturn" in isGuaranteedToTransferExecutionToSuccessorJohannes Doerfert2019-06-271-0/+3
| | | | | | | | | | | | | | | | | | | | | The `willreturn` function attribute guarantees that a function call will come back to the call site if the call is also known not to throw. Therefore, this attribute can be used in `isGuaranteedToTransferExecutionToSuccessor`. Patch by Hideto Ueno (@uenoku) Reviewers: jdoerfert, sstefan1 Reviewed By: jdoerfert Subscribers: hiraditya, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63372 llvm-svn: 364580
* Revert r363658 "[SVE][IR] Scalable Vector IR Type with pr42210 fix"Hans Wennborg2019-06-272-165/+0
| | | | | | | | | | | | | | | | | | | | | | | | We saw a 70% ThinLTO link time increase in Chromium for Android, see crbug.com/978817. Sounds like more of PR42210. > Recommit of D32530 with a few small changes: > - Stopped recursively walking through aggregates in > the verifier, so that we don't impose too much > overhead on large modules under LTO (see PR42210). > - Changed tests to match; the errors are slightly > different since they only report the array or > struct that actually contains a scalable vector, > rather than all aggregates which contain one in > a nested member. > - Corrected an older comment > > Reviewers: thakis, rengolin, sdesmalen > > Reviewed By: sdesmalen > > Differential Revision: https://reviews.llvm.org/D63321 llvm-svn: 364543
* BitStream reader: propagate errorsJF Bastien2019-06-261-11/+25
| | | | | | | | | | | | | | | | | | | | | | The bitstream reader handles errors poorly. This has two effects: * Bugs in file handling (especially modules) manifest as an "unexpected end of file" crash * Users of clang as a library end up aborting because the code unconditionally calls `report_fatal_error` The bitstream reader should be more resilient and return Expected / Error as soon as an error is encountered, not way late like it does now. This patch starts doing so and adopting the error handling where I think it makes sense. There's plenty more to do: this patch propagates errors to be minimally useful, and follow-ups will propagate them further and improve diagnostics. https://bugs.llvm.org/show_bug.cgi?id=42311 <rdar://problem/33159405> Differential Revision: https://reviews.llvm.org/D63518 llvm-svn: 364464
* Add GSYM utility files along with unit tests.Greg Clayton2019-06-263-0/+406
| | | | | | | | | | | | | | | | | | | | | | | | The full GSYM patch started with: https://reviews.llvm.org/D53379 In that patch we wanted to split up getting GSYM into the LLVM code base so we are not committing too much code at once. This is a first in a series of patches where I only add the foundation classes along with complete unit tests. They provide the foundation for encoding and decoding a GSYM file. File entries are defined in llvm::gsym::FileEntry. This class splits the file up into a directory and filename represented by uniqued string table offsets. This allows all files that are referred to in a GSYM file to be encoded as 1 based indexes into a global file table in the GSYM file. Function information in stored in llvm::gsym::FunctionInfo. This object represents a contiguous address range that has a name and range with an optional line table and inline call stack information. Line table entries are defined in llvm::gsym::LineEntry. They store only address, file and line information to keep the line tables simple and allows the information to be efficiently encoded in a subsequent patch. Inline information is defined in llvm::gsym::InlineInfo. These structs store the name of the inline function, along with one or more address ranges, and the file and line that called this function. They also contain any child inline information. There are also utility classes for address ranges in llvm::gsym::AddressRange, and string table support in llvm::gsym::StringTable which are simple classes. The unit tests test all the APIs on these simple classes so they will be ready for the next patches where we will create GSYM files and parse GSYM files. Differential Revision: https://reviews.llvm.org/D63104 llvm-svn: 364427
OpenPOWER on IntegriCloud