summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix TestDataFormatter.test uninitialized variableJan Kratochvil2019-03-073-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After D55626 I see a failure in my Fedora buildbot. There is uninitialized variable as the Foo constructor has not been run and foo is an autovariable. (lldb) breakpoint set -f foo.cpp -l 11 Breakpoint 1: where = TestDataFormatter.test.tmp.out`main + 30 at foo.cpp:11:7, address = 0x000000000040112e (lldb) run Process 801065 stopped * thread #1, name = 'TestDataFormatt', stop reason = breakpoint 1.1 frame #0: 0x000000000040112e TestDataFormatter.test.tmp.out`main(argc=1, argv=0x00007fffffffcc48) at foo.cpp:11:7 8 }; 9 10 int main(int argc, char **argv) { -> 11 Foo foo(1, 2.22); 12 return 0; 13 } Process 801065 launched: '.../tools/lldb/lit/Reproducer/Functionalities/Output/TestDataFormatter.test.tmp.out' (x86_64) (lldb) frame var (int) argc = 1 (char **) argv = 0x00007fffffffcc48 (Foo) foo = (m_i = 4198432, m_d = 0) While the testcase expects m_i will be 0. Differential Revision: https://reviews.llvm.org/D59088 llvm-svn: 355611
* [Reproducers] Disable registering lldb::thread_t everywhereJonas Devlieghere2019-03-071-11/+0
| | | | | | | | | As discussed on the mailing list, default serialization for thread ids is not correct, even if they're represented as basic types. I'm purposely leaving the corresponding record macros in place so that we don't break the API boundary detection. llvm-svn: 355610
* [Sema] Change addr space diagnostics in casts to follow C++ style.Anastasia Stulova2019-03-076-58/+232
| | | | | | | | | | | | | | | | | | | | This change adds a new diagnostic for mismatching address spaces to be used for C++ casts (only enabled in C style cast for now, the rest will follow!). The change extends C-style cast rules to account for address spaces. It also adds a separate function for address space cast checking that can be used to map from a separate address space cast operator addrspace_cast (to be added as a follow up patch). Note, that after this change clang will no longer allows arbitrary address space conversions in reinterpret_casts because they can lead to accidental errors. The implicit safe conversions would still be allowed. Differential Revision: https://reviews.llvm.org/D58346 llvm-svn: 355609
* [PR40778][Sema] Adjust addr space of operands in builtin operators.Anastasia Stulova2019-03-072-5/+60
| | | | | | | | | | | | Adjust address space for references and pointer operands of builtin operators. Currently this change only fixes addr space in assignment (= and |=) operator, that is needed for the test case reported in the bug. Wider support for all other operations will follow. Differential Revision: https://reviews.llvm.org/D58719 llvm-svn: 355608
* [DebugInfo] Fix the type of the formated variablePetar Jovanovic2019-03-072-4/+4
| | | | | | | | | | | | | Change the format type of *Personality and *LSDAAddress to PRIx64 since they are of type uint64_t. The problem was detected on mips builds, where it was printing junk values and causing test failure. Patch by Milos Stojanovic. Differential Revision: https://reviews.llvm.org/D58451 llvm-svn: 355607
* [PR40778] Preserve addr space in Derived to Base cast.Anastasia Stulova2019-03-073-3/+31
| | | | | | | | | The address space for the Base class pointer when up-casting from Derived should be taken from the Derived class pointer. Differential Revision: https://reviews.llvm.org/D53818 llvm-svn: 355606
* [analyzer] handle modification of vars inside an expr with comma operatorPetar Jovanovic2019-03-073-13/+167
| | | | | | | | | | | | | | | | | We should track mutation of a variable within a comma operator expression. Current code in ExprMutationAnalyzer does not handle it. This will handle cases like: (a, b) ++ < == b is modified (a, b) = c < == b is modifed Patch by Djordje Todorovic. Differential Revision: https://reviews.llvm.org/D58894 llvm-svn: 355605
* gn build: Port r342002Nico Weber2019-03-071-0/+7
| | | | | | | | | | I had hoped we could remove the dependency on shell32.lib from lib/Support (there isn't much depending on it), but looks like this will take a while. So for now, port this over. Differential Revision: https://reviews.llvm.org/D58925 llvm-svn: 355604
* gn build: Merge r355522Nico Weber2019-03-071-0/+1
| | | | llvm-svn: 355603
* [LLD][COFF] Restrict the failifmismatch test to x86_64-windows-msvc because ↵Alexandre Ganea2019-03-071-2/+4
| | | | | | the ELF container doesn't support llvm.linker.options meta-data with only one operand. llvm-svn: 355602
* expected-no-diagnostics@ does not make sense, switching to a more idiomatic ↵Aaron Ballman2019-03-071-2/+4
| | | | | | form; NFC. llvm-svn: 355601
* [llvm-readobj] Dump DT_USED value as string like GNU readelf doesXing GUO2019-03-072-2/+9
| | | | | | | | | | | | | | Reviewers: jhenderson Reviewed By: jhenderson Subscribers: rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59089 llvm-svn: 355600
* [clangd] Strip plugin arguments in clangd-indexer.Haojian Wu2019-03-071-1/+3
| | | | | | | | | | | | | | | | Summary: This would allow clangd-indexer runs on chromium repo. Reviewers: kadircet Reviewed By: kadircet Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59022 llvm-svn: 355599
* [ASTImporter] Changed use of Import to Import_New in ASTImporter.Balazs Keri2019-03-072-322/+379
| | | | | | | | | | | | | | Reviewers: a.sidorin, shafik, a_sidorin, martong Reviewed By: a_sidorin Subscribers: rnkovacs, jdoerfert, davide, aprantl, llvm-commits, gamesh411, a_sidorin, dkrupp, martong, Szelethus, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D53818 llvm-svn: 355598
* [LSR] Attempt to increase the accuracy of LSR's setup costDavid Green2019-03-075-10/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | In some loops, we end up generating loop induction variables that look like: {(-1 * (zext i16 (%i0 * %i1) to i32))<nsw>,+,1} As opposed to the simpler: {(zext i16 (%i0 * %i1) to i32),+,-1} i.e we count up from -limit to 0, not the simpler counting down from limit to 0. This is because the scores, as LSR calculates them, are the same and the second is filtered in place of the first. We end up with a redundant SUB from 0 in the code. This patch tries to make the calculation of the setup cost a little more thoroughly, recursing into the scev members to better approximate the setup required. The cost function for comparing LSR costs is: return std::tie(C1.NumRegs, C1.AddRecCost, C1.NumIVMuls, C1.NumBaseAdds, C1.ScaleCost, C1.ImmCost, C1.SetupCost) < std::tie(C2.NumRegs, C2.AddRecCost, C2.NumIVMuls, C2.NumBaseAdds, C2.ScaleCost, C2.ImmCost, C2.SetupCost); So this will only alter results if none of the other variables turn out to be different. Differential Revision: https://reviews.llvm.org/D58770 llvm-svn: 355597
* [ASTImporter] Import member expr with explicit template argsGabor Marton2019-03-072-3/+57
| | | | | | | | | | | | | | | | Summary: Member expressions with explicit template arguments were not imported correctly: the DeclRefExpr was missing. This patch fixes. Reviewers: a_sidorin, shafik, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58830 llvm-svn: 355596
* [LLD][COFF] Attempt fix for failifmismatch test on aarch64-only builder.Alexandre Ganea2019-03-072-29/+14
| | | | | | Shall fix: http://lab.llvm.org:8011/builders/clang-cmake-aarch64-lld/builds/6150 llvm-svn: 355595
* [MIPS GlobalISel] Fix mul operandsPetar Avramovic2019-03-075-36/+70
| | | | | | | | | | | | | | | | | Unsigned mul high for MIPS32 is selected into two PseudoInstructions: PseudoMULTu and PseudoMFHI that use accumulator register class ACC64 for some of its operands. Registers in this class have appropriate hi and lo register as subregisters: $lo0 and $hi0 are subregisters of $ac0 etc. mul instruction implicit-defs $lo0 and $hi0 according to MipsInstrInfo.td. In functions where mul and PseudoMULTu are present fastRegisterAllocator will "run out of registers during register allocation" because 'calcSpillCost' for $ac0 will return spillImpossible because subregisters $lo0 and $hi0 of $ac0 are reserved by mul instruction above. A solution is to mark implicit-defs of $lo0 and $hi0 as dead in mul instruction. Differential Revision: https://reviews.llvm.org/D58715 llvm-svn: 355594
* [ASTImporter] Handle redecl chain of FunctionTemplateDeclsGabor Marton2019-03-072-50/+54
| | | | | | | | | | | | | | | | | | | Summary: Redecl chains of function templates are not handled well currently. We want to handle them similarly to functions, i.e. try to keep the structure of the original AST as much as possible. The aim is to not squash a prototype with a definition, rather we create both and put them in a redecl chain. Reviewers: a_sidorin, shafik, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58494 llvm-svn: 355593
* [analyzer] Handle comparison between non-default AS symbol and constantDavid Stenberg2019-03-072-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When comparing a symbolic region and a constant, the constant would be widened or truncated to the width of a void pointer, meaning that the constant could be incorrectly truncated when handling symbols for non-default address spaces. In the attached test case this resulted in a false positive since the constant was truncated to zero. To fix this, widen/truncate the constant to the width of the symbol expression's type. This commit does not consider non-symbolic regions as I'm not sure how to generalize getting the type there. This fixes PR40814. Reviewers: NoQ, zaks.anna, george.karpenkov Reviewed By: NoQ Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, jdoerfert, Charusso, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58665 llvm-svn: 355592
* [yaml2obj] - Allow producing ELFDATANONE ELFsGeorge Rimar2019-03-073-4/+19
| | | | | | | | | I need this to remove a binary from LLD test suite. The patch also simplifies the code a bit. Differential revision: https://reviews.llvm.org/D59082 llvm-svn: 355591
* Fix & re-enable test that intermittently failed in debug mode.Michael Platings2019-03-071-4/+5
| | | | | | The Value class and derivates will have uninitialized member variables if not created via operator new. llvm-svn: 355590
* [IDF] Delete a redundant J-edge testFangrui Song2019-03-071-5/+0
| | | | | | | | | | | | | | In the DJ-graph based computation of iterated dominance frontiers, SuccNode->getIDom() == Node is one of the tests to check if (Node,Succ) is a J-edge. If it is true, since Node is dominated by Root, SuccLevel = level(Node)+1 > RootLevel which means the next test SuccLevel > RootLevel will also be true. test the check is redundant and can be deleted as it also involves one indirection and provides no speed-up. llvm-svn: 355589
* Temporarily disable newly added test that fails in debug mode.Michael Platings2019-03-071-1/+1
| | | | llvm-svn: 355588
* Add newline to interpreter debugging outputKristof Beyls2019-03-071-1/+1
| | | | | | | | | | | When running lli --debug --force-interpreter=true the executed instructions are printed but are missing newlines. This commit adds the missing newlines. Patch by Andrew Brown. Differential Revision: https://reviews.llvm.org/D57806 llvm-svn: 355587
* [libclang] Fix CXTranslationUnit_KeepGoingIvan Donchevskii2019-03-077-16/+30
| | | | | | | | | | | | | | | | | | Since commit 56f548bbbb7e4387a69708f70724d00e9e076153 [modules] Round-trip -Werror flag through explicit module build. the behavior of CXTranslationUnit_KeepGoing changed: Unresolved #includes are fatal errors again. As a consequence, some templates are not instantiated and lead to confusing errors. Revert to the old behavior: With CXTranslationUnit_KeepGoing fatal errors are mapped to errors. Patch by Nikolai Kosjar. Differential Revision: https://reviews.llvm.org/D58501 llvm-svn: 355586
* [IR][ARM] Add function pointer alignment to datalayoutMichael Platings2019-03-0713-25/+278
| | | | | | | | | Use this feature to fix a bug on ARM where 4 byte alignment is incorrectly assumed. Differential Revision: https://reviews.llvm.org/D57335 llvm-svn: 355585
* [BDCE] Optimize find+insert with early insertFangrui Song2019-03-071-5/+5
| | | | llvm-svn: 355583
* [X86] Enable combineFMinNumFMaxNum for 512 bit vectors when AVX512 is enabled.Craig Topper2019-03-073-281/+23
| | | | | | | | Simplified by just checking if the vector type is legal rather than listing all combinations of types and features. Fixes PR40984. llvm-svn: 355582
* [X86] Add 512-bit fminnum/maxnum test cases for PR40984. Also add v8f32 ↵Craig Topper2019-03-072-68/+576
| | | | | | minnum/maxnum tests. NFC llvm-svn: 355581
* [WebAssembly] Fix build after rL355577Sam Clegg2019-03-071-1/+1
| | | | | | | | Turns own that IsUsedInRegularObject is set for lazy (archive) symbols. Differential Revision: https://reviews.llvm.org/D59074 llvm-svn: 355580
* Skip TestGdbserverPort.test on WindowsJan Kratochvil2019-03-071-1/+3
| | | | | | | | | | | lldb/cmake/modules/LLDBConfig.cmake does not build lldb-server on Windows: if (CMAKE_SYSTEM_NAME MATCHES "Android|Darwin|FreeBSD|Linux|NetBSD") set(LLDB_CAN_USE_LLDB_SERVER 1) Also do not append 'platform' parameter twice - although that was quietly ignored. llvm-svn: 355579
* When disassembling Aarch64 target and vendor Apple, set the cpu toJason Molenda2019-03-074-0/+90
| | | | | | | | | | | | "apple-latest" which llvm uses to indicate the newest supported ISA. Add a unit test; I'm only testing an armv8.1 instruction in this unit test which would already be disassembled correctly because we set the disassembler to ARM v8.2 mode, but it ensures that nothing has been broken by adding this cpu spec. <rdar://problem/38714781> llvm-svn: 355578
* [WebAssembly] LTO: Don't include bitcode-only symbols in the symtabSam Clegg2019-03-073-1/+30
| | | | | | | | Fixes https://bugs.llvm.org/show_bug.cgi?id=40654 Differential Revision: https://reviews.llvm.org/D59012 llvm-svn: 355577
* [InterleavedAccessAnalysis] Use fixed size integers for InterleaveGroup.Florian Hahn2019-03-071-15/+15
| | | | | | | | | | | | | | Reviewers: Ayal, hsaito, anna, efriedma, dorit Reviewed By: efriedma Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58889 llvm-svn: 355576
* Repair the build when LLDB_DISABLE_PYTHON is setAlex Langford2019-03-071-20/+28
| | | | | | | | | | | Summary: If LLDB_DISABLE_PYTHON is set, some functions are unavailable but SBReproducer assumes they are. Let's conditionally register those functions since they are conditionally declared. Differential Revision: https://reviews.llvm.org/D59056 llvm-svn: 355575
* AMDGPU: Handle "uniform-work-group-size" attribute (fix for RADV)Aakanksha Patil2019-03-079-30/+264
| | | | | | | | | | A previous patch for "uniform-work-group-size" attribute was found to break some RADV and possibly radeon SI tests and had to be retracted. This patch fixes that. Differential Revision: http://reviews.llvm.org/D58993 llvm-svn: 355574
* Avoid using -S in combination with "script"; it's unreliable.Adrian Prantl2019-03-071-1/+1
| | | | llvm-svn: 355573
* crashlog.py: Catch exception from subprocess.Adrian Prantl2019-03-071-1/+5
| | | | llvm-svn: 355572
* Relax testcase.Adrian Prantl2019-03-071-1/+1
| | | | | | | Recent versions of llvm monorepo builds build libc++abi.dylib as libc++abi.1.dylib. This accespts both variants. llvm-svn: 355571
* [Reproducers] Add tests for different types of functionalityJonas Devlieghere2019-03-076-0/+201
| | | | | | | | | | | | | This patch adds test that check that functionality in lldb continues to work when replaying a reproducer. - Entries in image list are identical. - That stepping behaves the same. - That the data formatters behave the same. Differential revision: https://reviews.llvm.org/D55626 llvm-svn: 355570
* Promote more debug-only assertions to regular assertions.Adrian Prantl2019-03-075-22/+2
| | | | llvm-svn: 355569
* Promote more debug-only assertions to regular assertions.Adrian Prantl2019-03-072-6/+0
| | | | llvm-svn: 355568
* [Python] Unbreak the recently modified tests for python 2.Davide Italiano2019-03-063-0/+3
| | | | llvm-svn: 355566
* Remove the warning inJason Molenda2019-03-061-9/+7
| | | | | | | | | | | | | | | | | | DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule which would list every kext that failed to load when doing kernel debugging. Instead, in DynamicLoaderDarwinKernel::ParseKextSummaries, print a summary of how many kexts lldb was unable to load at the end. I want to reduce the amount of output at the start of kernel debug sessions a bit; we'll see if anyone really wanted to see the list of which kexts specifically were unable to be loaded. No functional change, only changing lldb's output at the start of a kernel debug session. <rdar://problem/48654569> llvm-svn: 355565
* [LoopRotate] fix crash encountered with callbrNick Desaulniers2019-03-062-3/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: While implementing inlining support for callbr (https://bugs.llvm.org/show_bug.cgi?id=40722), I hit a crash in Loop Rotation when trying to build the entire x86 Linux kernel (drivers/char/random.c). This is a small fix up to r353563. Test case is drivers/char/random.c (with callbr's inlined), then ran through creduce, then `opt -opt-bisect-limit=<limit>`, then bugpoint. Thanks to Craig Topper for immediately spotting the fix, and teaching me how to fish. Reviewers: craig.topper, jyknight Reviewed By: craig.topper Subscribers: hiraditya, llvm-commits, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D58929 llvm-svn: 355564
* [PGO] Re-submit: Clang part of change for context-sensitive PGO (part2)Rong Xu2019-03-065-0/+141
| | | | | | | | Part 2 of CSPGO change in Clang: Add test cases. Differential Revision: https://reviews.llvm.org/D54176 llvm-svn: 355563
* [testsuite] Port crashlog to python 3, second attempt.Davide Italiano2019-03-063-114/+112
| | | | llvm-svn: 355562
* Fix Cmake files for ExpressionSourceCode.cpp -> ClangExpressionSourceCode.cpp.Jim Ingham2019-03-062-1/+1
| | | | llvm-svn: 355561
* Factor the clang specific parts of ExpressionSourceCode.{h,cpp} into the ↵Jim Ingham2019-03-069-48/+79
| | | | | | | | | | clang plugin. NFC Differential Revision: https://reviews.llvm.org/D59040 llvm-svn: 355560
OpenPOWER on IntegriCloud