llvm-6502/lib/IR
David Majnemer 2822246ece [IR] Make getFirstNonPHI return null if the BB is empty
getFirstNonPHI's documentation states that it returns null if there is
no non-PHI instruction.  However, it instead returns a pointer to the
end iterator.  The implementation of getFirstNonPHI claims that
dereferencing the iterator will result in an assertion failure but this
doesn't occur.  Instead, machinery like getFirstInsertionPt will attempt
to isa<> this invalid memory which results in unpredictable behavior.
Instead, make getFirst* return null if no such instruction exists.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241570 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-07 09:15:29 +00:00
..
AsmWriter.cpp Add a DIModule metadata node to the IR. 2015-06-29 23:03:47 +00:00
AttributeImpl.h
Attributes.cpp
AutoUpgrade.cpp Remove always-true comparison, NFC. 2015-07-03 20:12:01 +00:00
BasicBlock.cpp [IR] Make getFirstNonPHI return null if the BB is empty 2015-07-07 09:15:29 +00:00
CMakeLists.txt
Comdat.cpp
ConstantFold.cpp
ConstantFold.h
ConstantRange.cpp
Constants.cpp Devirtualize Constant::replaceUsesOfWithOnConstant. 2015-06-24 18:55:24 +00:00
ConstantsContext.h
Core.cpp
DataLayout.cpp
DebugInfo.cpp Add a DIModule metadata node to the IR. 2015-06-29 23:03:47 +00:00
DebugInfoMetadata.cpp Add a DIModule metadata node to the IR. 2015-06-29 23:03:47 +00:00
DebugLoc.cpp
DiagnosticInfo.cpp
DiagnosticPrinter.cpp
DIBuilder.cpp DIBuilder: Don't rauw null pointers with empty arrays in finalize(). 2015-07-06 16:36:02 +00:00
Dominators.cpp
Function.cpp
GCOV.cpp
Globals.cpp Devirtualize Constant::replaceUsesOfWithOnConstant. 2015-06-24 18:55:24 +00:00
GVMaterializer.cpp
InlineAsm.cpp
Instruction.cpp Devirtualize Instruction::clone_impl 2015-06-24 20:22:23 +00:00
Instructions.cpp Add functions for adding and testing string attributes to CallInst. NFC. 2015-07-02 22:08:48 +00:00
IntrinsicInst.cpp
IRBuilder.cpp
IRPrintingPasses.cpp
LegacyPassManager.cpp
LLVMBuild.txt
LLVMContext.cpp
LLVMContextImpl.cpp
LLVMContextImpl.h Add a DIModule metadata node to the IR. 2015-06-29 23:03:47 +00:00
Makefile
Mangler.cpp Remove unused arguments and move ManglerPrefixTy to the implementation. 2015-06-23 14:11:09 +00:00
MDBuilder.cpp
Metadata.cpp
MetadataImpl.h
MetadataTracking.cpp
Module.cpp
module.modulemap
Operator.cpp
Pass.cpp
PassManager.cpp
PassRegistry.cpp
Statepoint.cpp
SymbolTableListTraitsImpl.h
Type.cpp
TypeFinder.cpp
Use.cpp
User.cpp
Value.cpp Devirtualize Constant::replaceUsesOfWithOnConstant. 2015-06-24 18:55:24 +00:00
ValueSymbolTable.cpp
ValueTypes.cpp
Verifier.cpp Verifier: Forbid comdats on linker declarations. 2015-07-05 20:52:40 +00:00