1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/unittests/IR
David Stenberg eea374d04e Allow null-valued function operands in getCalledFunction()
Summary:
Change the dynamic cast in CallBase::getCalledFunction() to allow
null-valued function operands.

This patch fixes a crash that occurred when a funtion operand of a
call instruction was dropped, and later on a metadata-carrying
instruction was printed out. When allocating the metadata slot numbers,
getCalledFunction() would be invoked on the call with the dropped
operand, resulting in a failed non-null assertion in isa<>.

This fixes PR38924, in which a printout in DBCE crashed due to this.

This aligns getCalledFunction() with getCalledValue(), as the latter
allows the operand to be null.

Reviewers: vsk, dexonsmith, hfinkel

Reviewed By: dexonsmith

Subscribers: hfinkel, llvm-commits

Differential Revision: https://reviews.llvm.org/D52537

llvm-svn: 345966
2018-11-02 11:46:24 +00:00
..
AsmWriterTest.cpp
AttributesTest.cpp [Attributes] Fix a bug in AttributeList::get so it can handle a mix of FunctionIndex and ReturnIndex/arg indices at the same time 2018-04-16 17:05:01 +00:00
BasicBlockTest.cpp [STLExtras] Add size() for ranges, and remove distance() 2018-05-16 23:20:42 +00:00
CFGBuilder.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
CFGBuilder.h
CMakeLists.txt [NewPM] teach -passes= to emit meaningful error messages 2018-10-17 10:36:23 +00:00
ConstantRangeTest.cpp [ConstantRange] Add support of mul in makeGuaranteedNoWrapRegion. 2018-06-26 18:54:10 +00:00
ConstantsTest.cpp Fix a bunch of places where operator-> was used directly on the return from dyn_cast. 2018-05-05 01:57:00 +00:00
DebugInfoTest.cpp
DebugTypeODRUniquingTest.cpp
DominatorTreeBatchUpdatesTest.cpp [DomTree] Cleanup Update and LegalizeUpdate API moved to Support header. 2018-08-14 17:12:30 +00:00
DominatorTreeTest.cpp [TI removal] Make getTerminator() return a generic Instruction. 2018-10-15 10:42:50 +00:00
DomTreeUpdaterTest.cpp [Dominators] Refine the logic of recalculate() in the DomTreeUpdater 2018-08-03 06:51:35 +00:00
FunctionTest.cpp
InstructionsTest.cpp [IR] add shuffle query for vector concatenation 2018-09-20 15:21:52 +00:00
IntrinsicsTest.cpp
IRBuilderTest.cpp [TI removal] Make getTerminator() return a generic Instruction. 2018-10-15 10:42:50 +00:00
LegacyPassManagerTest.cpp allow custom OptBisect classes set to LLVMContext 2018-04-05 10:29:37 +00:00
ManglerTest.cpp
MDBuilderTest.cpp
MetadataTest.cpp Allow null-valued function operands in getCalledFunction() 2018-11-02 11:46:24 +00:00
ModuleTest.cpp
PassBuilderCallbacksTest.cpp [NewPM] teach -passes= to emit meaningful error messages 2018-10-17 10:36:23 +00:00
PassManagerTest.cpp [New PM] Introducing PassInstrumentation framework 2018-09-20 17:08:45 +00:00
PatternMatch.cpp [PatternMatch] Add m_Store pattern match helper 2018-06-20 07:27:45 +00:00
TypeBuilderTest.cpp
TypesTest.cpp
UserTest.cpp
UseTest.cpp
ValueHandleTest.cpp
ValueMapTest.cpp s/LLVM_ON_WIN32/_WIN32/, llvm 2018-04-29 00:45:03 +00:00
ValueTest.cpp
VerifierTest.cpp
WaymarkTest.cpp