llvm-6502/lib/IR
Derek Schuff c06e5cf2e3 Fix DeleteDeadVarargs not to crash on functions referenced by BlockAddresses
This pass was assuming that if hasAddressTaken() returns false for a
function, the function's only uses are call sites.  That's not true
because there can be references by BlockAddresses too.

Fix the pass to handle this case.  Fix
BlockAddress::replaceUsesOfWithOnConstant() to allow a function's type
to be changed by RAUW'ing the function with a bitcast of the recreated
function.

Patch by Mark Seaborn.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183933 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 19:51:17 +00:00
..
AsmWriter.cpp
AsmWriter.h
AttributeImpl.h
Attributes.cpp
AutoUpgrade.cpp
BasicBlock.cpp
CMakeLists.txt
ConstantFold.cpp
ConstantFold.h
Constants.cpp
ConstantsContext.h
Core.cpp
DataLayout.cpp
DebugInfo.cpp
DebugLoc.cpp
DIBuilder.cpp
Dominators.cpp
Function.cpp
GCOV.cpp
Globals.cpp
GVMaterializer.cpp
InlineAsm.cpp
Instruction.cpp
Instructions.cpp
IntrinsicInst.cpp
IRBuilder.cpp
LeakDetector.cpp
LeaksContext.h
LLVMBuild.txt
LLVMContext.cpp
LLVMContextImpl.cpp
LLVMContextImpl.h
Makefile
Metadata.cpp
Module.cpp
Pass.cpp
PassManager.cpp
PassRegistry.cpp
PrintModulePass.cpp
SymbolTableListTraitsImpl.h
Type.cpp
TypeFinder.cpp
Use.cpp
User.cpp
Value.cpp
ValueSymbolTable.cpp
ValueTypes.cpp
Verifier.cpp