Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/merge upstream 20210817 2 #81

Merged
merged 111 commits into from
Aug 26, 2021
Merged
Changes from 1 commit
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
6eeb4c1
[OpenMP] Fix incorrect parameters to sscanf_s call
jpeyton52 Jul 13, 2021
b4a1f44
[OpenMP] Add a few small fixes
jpeyton52 Jun 28, 2021
d6fe8d3
[DAG] Fold concat_vectors(concat_vectors(x,y),concat_vectors(a,b)) ->…
RKSimon Aug 16, 2021
5033f07
[lldb] Avoid unhandled Error in TypeSystemMap::GetTypeSystemForLanguage
DimitryAndric Aug 15, 2021
5ed162c
[libc++][NFC] Replace uses of 'constexpr friend' by 'friend constexpr'
ldionne Aug 16, 2021
92abb1c
[TypePromotion] Don't mutate the result type of SwitchInst.
topperc Aug 16, 2021
cf521e7
[lldb] Add tests for TypeSystemMap::GetTypeSystemForLanguage
Teemperor Aug 16, 2021
94b4598
[PS4] stp[n]cpy not available on PS4
pogo59 Aug 16, 2021
4cfb047
[profile] Don't use pragma comment linker on mingw
nikic Aug 15, 2021
f62d0d4
Fix whitespace typo in 94b4598
pogo59 Aug 16, 2021
778440f
[X86] Add i128 funnel shift tests
RKSimon Aug 16, 2021
5592710
[NFC] Trim trailing whitespaces in `llvm/CMakeLists.txt`
shiltian Aug 16, 2021
4357562
[NFC][AArch64] Fix unused var in release build
rupprecht Aug 16, 2021
b7425e9
[NFC] Fix typos
xur-llvm Aug 16, 2021
5fc841d
[scudo] Use stdint types for internal scudo types
Aug 15, 2021
8bc72de
[Clang][AST][NFC] Resolve FIXME: Remove unused QualType ElementType m…
AZero13 Aug 16, 2021
80ed75e
Revert "[NFC] Fix typos"
Aug 16, 2021
427c9aa
Revert "[scudo] Use stdint types for internal scudo types"
Aug 16, 2021
0a03144
[PassBuilder] Don't use MemorySSA for standalone LoopRotate passes
nikic Aug 14, 2021
570c9be
[MemorySSA] Remove unnecessary MSSA dependencies
nikic Aug 14, 2021
19a906f
[mlir][sparse][python] make imports more selective
aartbik Aug 16, 2021
65532ea
[mlir][linalg] Clear unused linalg tc operations
rsuderman Aug 16, 2021
735a590
[MemorySSA] Remove -enable-mssa-loop-dependency option
nikic Aug 14, 2021
b9e433b
Prevent machine licm if remattable with a vreg use
rampitec Aug 9, 2021
9b8425e
Reapply commit b7425e956
xur-llvm Aug 16, 2021
b51e71f
[Bazel] Update for 957334382c
GMNGeoffrey Aug 16, 2021
6c0e6f9
[profile] Add static keyword to binary id functions
gulfemsavrun Aug 16, 2021
15dc93e
[lld-macho] Ignore LLVM segments to prevent duplicate syms
thevinster Aug 12, 2021
877572c
Allow rematerialization of virtual reg uses
rampitec Aug 9, 2021
93d08ac
[clang-offload-wrapper] Add standard notes for ELF offload images
Aug 13, 2021
8c23669
[hwasan] Ignore lit config.enable_aliases on non-x86.
eugenis Aug 14, 2021
65bc8ba
Correctly update reproducer hooks for SB API I added
jasonmolenda Aug 16, 2021
5bab1f0
[ARM][TypePromotion] Re-generate test checks. NFC
topperc Aug 16, 2021
aa575ed
Ah, fix formatting, I didn't notice lldb-instr's code
jasonmolenda Aug 16, 2021
f22ba51
[Remarks] Emit optimization remarks for atomics generating CAS loop
gandhi56 Aug 16, 2021
f328f72
[mlir][tosa] Fixed depthwise conv parallel/reduction indices order
rsuderman Aug 16, 2021
2c6448c
[sanitizer] Define 32bit uptr as uint
vitalybuka Aug 14, 2021
b2aaafb
[scudo] Use stdint types for internal types (redo)
Aug 16, 2021
9236dea
[ARM] Create MQQPR and MQQQQPR register classes
davemgreen Aug 16, 2021
8e4efad
[libc] Optimize Loop strategy
gchatelet Aug 16, 2021
ae0628f
[sanitizer] Fix MAC build after D108163
vitalybuka Aug 16, 2021
83457d3
[libc] dedup handling of size 4 for memset
gchatelet Aug 16, 2021
913b5d2
[AsmPrinter] fix nullptr dereference for MBBs with hasAddressTaken pr…
ivafanas Aug 16, 2021
eec3495
[M68k] Do not pass llvm::Function& to M68kCCState
mshockwave Aug 16, 2021
3a05af1
Revert "[sanitizer] Fix MAC build after D108163"
vitalybuka Aug 16, 2021
7256c05
[sanitizer] Define 32bit uptr as uint
vitalybuka Aug 14, 2021
0d822da
[NFC] Remove/replace some confusing attribute getters on Function
aeubanks Aug 16, 2021
797fe59
[tsan] Fix GCC 8.3 build after D107911
vitalybuka Aug 16, 2021
d8a08fa
Clean up test for -f{,no-}implicit-modules-uses-lock
dexonsmith Aug 16, 2021
a1e2186
[SamplePGO] Fixing a memory issue when creating profiles on-demand
htyu Aug 16, 2021
5a95ff2
[lldb] Fix -Wunused-but-set-variable
MaskRay Aug 16, 2021
fef39cc
[tsan] Another attempt to fix GCC 8.3 build after D107911
dyung Aug 17, 2021
e2c97d4
[MLIR] Add a bitcast method to DenseElementsAttr
GMNGeoffrey Aug 5, 2021
9ed4a94
[clang] Expose unreachable fallthrough annotation warning
nathanchance Aug 17, 2021
f27fee6
[SamplePGO][NFC] Dump function profiles in order
htyu Aug 16, 2021
4c4ab67
[mlir][Analysis][NFC] Split FlatAffineConstraints class
matthias-springer Aug 17, 2021
c411c1b
Fix missing qualifier in template type diffing
Weverything Aug 16, 2021
c19c51e
[mlir][Analysis][NFC] Clean up FlatAffineValueConstraints
matthias-springer Aug 17, 2021
99c790d
[AMDGPU] Make BVH isel consistent with other MIMG opcodes
perlfu Aug 17, 2021
08d55c5
[lld-macho] Refactor parseSections to avoid creating isec on LLVM seg…
thevinster Aug 16, 2021
5821047
[MLIR] [Python] Fix out-of-tree Windows python bindings
teqdruid Aug 17, 2021
54e76cb
[split-file] Default to --no-leading-lines
MaskRay Aug 17, 2021
f74b70e
[lld-macho][test] Remove ld64.lld: prefix in a diagnostic
MaskRay Aug 17, 2021
6866076
[AMDGPU] Skip pseudo MIs in hazard recognizer
cdevadas Aug 13, 2021
b31199b
[AVR][clang] Improve search for avr-libc installation path
benshi001 Aug 7, 2021
a41c95c
[LNICM] Fix infinite loop
Aug 17, 2021
8f5e9d6
[AsmParser] Remove MDConstant (NFC)
kazutakahirata Aug 17, 2021
9790a2a
[tests] precommit tests for D107692
vfdff Aug 17, 2021
198e677
[analyzer] Add option to SATest.py for extra checkers
RedDocMD Aug 17, 2021
1689dad
[MLIR] [Python] Allow 'operation.parent' to return 'None'
teqdruid Aug 17, 2021
ce8272a
[Polly][Isl] Use isl::val::sub instead of isl::val::sub_ui. NFC
patacca Aug 17, 2021
4f21e6a
[flang][nfc] Tweak the FrontendAction class
banach-space Aug 13, 2021
ebdb0d0
AMDGPU: During img instruction ret value construction cater for non i…
dstutt Feb 5, 2020
bcec4cc
[X86] [AMX] Replace bitcast with specific AMX intrinsics with X86 spe…
yubingex007-a11y Aug 5, 2021
583a754
[mlir][linalg] Remove duplicate methods (NFC).
Aug 17, 2021
6d952b0
[NFC] Fix typos
PeixinQiao Aug 17, 2021
0deedaa
[hwasan] Prevent reordering of tag checks.
fmayer Aug 11, 2021
8f8f926
[Test][AggressiveInstCombine] Add test for shifts
anton-afanasyev Aug 12, 2021
1f3e35b
[AggressiveInstCombine] Add shift left instruction to `TruncInstCombi…
anton-afanasyev Aug 12, 2021
895ed64
[AArch64] LowerCONCAT_VECTORS - merge getNumOperands() calls. NFCI.
RKSimon Aug 17, 2021
708cbda
[DebugInfo][InstrRef] Honour too-much-debug-info cutouts
jmorse Aug 17, 2021
9cfa9b4
[CodeGenPrepare] The instruction to be sunk should be inserted before…
huhu233 Aug 17, 2021
fc5495c
[lldb] Make TestAArch64AdrpAdd depend on the AArch64 target
Teemperor Aug 17, 2021
fbae346
[GlobalISel] Add combine for PTR_ADD with regbanks
Flakebi Aug 17, 2021
8fb269d
[InstCombine] add tests for smin/smax intrinsics with negated ops; NFC
rotateright Aug 16, 2021
d0975b7
[InstCombine] fold signed min/max intrinsics with negated operands
rotateright Aug 17, 2021
e73f4e1
[InstCombine] remove unused function argument; NFC
rotateright Aug 17, 2021
62e892f
[ARM] Add MQQPR and MQQQQPR spill and reload pseudo instructions
davemgreen Aug 17, 2021
52e0cf9
[ARM] Enable subreg liveness
davemgreen Aug 17, 2021
9de882f
[libc++][NFC] Refactor tests for transform_view
ldionne Aug 17, 2021
ef198cd
[SVE] Remove usage of getMaxVScale for AArch64, in favour of IR Attri…
DylanFleming-arm Aug 17, 2021
3c4fad6
[LIT]Accept cat_64 command name on AIX in shtest
Aug 17, 2021
a14920c
[Bitcode] Remove unused declaration writeBitcodeHeader (NFC)
kazutakahirata Aug 17, 2021
c67f497
[libc++][NFC] Fix indentation of documentation
ldionne Aug 17, 2021
5c6f748
[MCParser] Correctly handle CRLF line ends when consuming line comments
SLTozer Aug 17, 2021
d2b574a
tsan: test: Initialize all fields of Params struct
melver Aug 17, 2021
ad40cb8
Fix: [MCParser] Correctly handle CRLF line ends when consuming line c…
SLTozer Aug 17, 2021
ceff0b7
[libc++] Do not require movability in __non_propagating_cache::__empl…
ldionne Aug 11, 2021
5009be2
[scudo] Fix format string specifiers
Aug 16, 2021
0f1e67f
[Polly] Fix possibly infinite loop.
Meinersbur Aug 17, 2021
2078c4e
[X86] Lower insertions into upper half of an 256-bit vector as broadc…
LebedevRI Aug 17, 2021
b28cb53
[libc++][NFC] Format expression-equivalent wrappers consistently
ldionne Aug 16, 2021
78cb1ad
[Object] Move llvm-nm's symbol version utility to ELFObjectFile::read…
MaskRay Aug 17, 2021
836649e
Allow setting attributes in build method generated by YAML-gen.
Aug 17, 2021
c56b4cf
[llvm-objdump] -T: print symbol versions
MaskRay Aug 17, 2021
6d5e31b
Fix 2: [MCParser] Correctly handle CRLF line ends when consuming line…
SLTozer Aug 17, 2021
9dabacd
[analyzer] Adjust JS code of analyzer's HTML report for IE support.
ASDenysPetrov Aug 3, 2021
982da7a
[SCEVExpander] Stop hoisting IR when reusing phis
preames Aug 17, 2021
339aa76
[OpenMP][NFC] Add option to print module after OpenMPOpt for debugging
jhuber6 Aug 16, 2021
9a56d71
[libc][NFC] Disable double precision cos, sin and tan on Windows.
Aug 17, 2021
1294162
Merge commit '9a56d71f616fca17b38b403befcaf225153df301' into feature/…
kaz7 Aug 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[lldb] Add tests for TypeSystemMap::GetTypeSystemForLanguage
Regression tests for D108088 .

Reviewed By: mib

Differential Revision: https://reviews.llvm.org/D108121
Teemperor committed Aug 16, 2021
commit cf521e78dfd2a418970358e5d55dcc9a862664e5
1 change: 1 addition & 0 deletions lldb/unittests/Symbol/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
add_lldb_unittest(SymbolTests
LocateSymbolFileTest.cpp
PostfixExpressionTest.cpp
TestTypeSystem.cpp
TestTypeSystemClang.cpp
TestClangASTImporter.cpp
TestDWARFCallFrameInfo.cpp
92 changes: 92 additions & 0 deletions lldb/unittests/Symbol/TestTypeSystem.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
//===-- TestTypeSystem.cpp -------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "TestingSupport/SubsystemRAII.h"
#include "lldb/Core/Module.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Symbol/TypeSystem.h"
#include "gtest/gtest.h"

using namespace lldb;
using namespace lldb_private;

class TestTypeSystemMap : public testing::Test {
public:
SubsystemRAII<FileSystem, HostInfo> subsystems;
};

TEST_F(TestTypeSystemMap, GetTypeSystemForLanguageWithInvalidModule) {
// GetTypeSystemForLanguage called with an invalid Module.
TypeSystemMap map;
Module module{ModuleSpec()};
EXPECT_THAT_EXPECTED(
map.GetTypeSystemForLanguage(eLanguageTypeUnknown, &module,
/*can_create=*/true),
llvm::FailedWithMessage("TypeSystem for language unknown doesn't exist"));

EXPECT_THAT_EXPECTED(
map.GetTypeSystemForLanguage(eLanguageTypeUnknown, &module,
/*can_create=*/false),
llvm::FailedWithMessage("TypeSystem for language unknown doesn't exist"));

EXPECT_THAT_EXPECTED(
map.GetTypeSystemForLanguage(eLanguageTypeC, &module,
/*can_create=*/true),
llvm::FailedWithMessage("TypeSystem for language c doesn't exist"));
EXPECT_THAT_EXPECTED(
map.GetTypeSystemForLanguage(eLanguageTypeC, &module,
/*can_create=*/false),
llvm::FailedWithMessage("TypeSystem for language c doesn't exist"));
}

TEST_F(TestTypeSystemMap, GetTypeSystemForLanguageWithNoModule) {
// GetTypeSystemForLanguage called with no Module.
TypeSystemMap map;
Module *module = nullptr;
EXPECT_THAT_EXPECTED(
map.GetTypeSystemForLanguage(eLanguageTypeUnknown, module,
/*can_create=*/true),
llvm::FailedWithMessage("TypeSystem for language unknown doesn't exist"));

EXPECT_THAT_EXPECTED(
map.GetTypeSystemForLanguage(eLanguageTypeUnknown, module,
/*can_create=*/false),
llvm::FailedWithMessage("TypeSystem for language unknown doesn't exist"));

EXPECT_THAT_EXPECTED(
map.GetTypeSystemForLanguage(eLanguageTypeC, module, /*can_create=*/true),
llvm::FailedWithMessage("TypeSystem for language c doesn't exist"));
EXPECT_THAT_EXPECTED(
map.GetTypeSystemForLanguage(eLanguageTypeC, module,
/*can_create=*/false),
llvm::FailedWithMessage("TypeSystem for language c doesn't exist"));
}

TEST_F(TestTypeSystemMap, GetTypeSystemForLanguageWithNoTarget) {
// GetTypeSystemForLanguage called with no Target.
TypeSystemMap map;
Target *target = nullptr;
EXPECT_THAT_EXPECTED(
map.GetTypeSystemForLanguage(eLanguageTypeUnknown, target,
/*can_create=*/true),
llvm::FailedWithMessage("TypeSystem for language unknown doesn't exist"));

EXPECT_THAT_EXPECTED(
map.GetTypeSystemForLanguage(eLanguageTypeUnknown, target,
/*can_create=*/false),
llvm::FailedWithMessage("TypeSystem for language unknown doesn't exist"));

EXPECT_THAT_EXPECTED(
map.GetTypeSystemForLanguage(eLanguageTypeC, target, /*can_create=*/true),
llvm::FailedWithMessage("TypeSystem for language c doesn't exist"));
EXPECT_THAT_EXPECTED(
map.GetTypeSystemForLanguage(eLanguageTypeC, target,
/*can_create=*/false),
llvm::FailedWithMessage("TypeSystem for language c doesn't exist"));
}