llvm/tools/bugpoint
Hal Finkel c818be073d [bugpoint] Fix "Alias must point to a definition" problems
GlobalAliases may reference function definitions, but not function declarations.

bugpoint would sometimes create invalid IR by deleting a function's body (thus
mutating a function definition into a declaration) without first 'fixing' any
GlobalAliases that reference that function definition.

This change iteratively prevents that issue. Before deleting a function's body,
it scans the module for GlobalAliases which reference that function. When
found, it eliminates them using replaceAllUsesWith.

Fixes PR20788.

Patch by Nick Johnson!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254171 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-26 19:23:49 +00:00
..
BugDriver.cpp [Bugpoint] Use 'CC' instead of 'GCC' for variable naming. 2015-10-14 20:29:54 +00:00
BugDriver.h [bugpoint] Fix "Alias must point to a definition" problems 2015-11-26 19:23:49 +00:00
bugpoint.cpp [bugpoint] llvm-gcc doesn't exist anymore ... 2015-10-15 01:12:01 +00:00
CMakeLists.txt [PM/AA] Remove the last relics of the separate IPA library from LLVM, 2015-08-18 17:51:53 +00:00
CrashDebugger.cpp [bugpoint] Fix "Alias must point to a definition" problems 2015-11-26 19:23:49 +00:00
ExecutionDriver.cpp [Bugpoint] Use 'CC' instead of 'GCC' for variable naming. 2015-10-14 20:29:54 +00:00
ExtractFunction.cpp [bugpoint] Fix "Alias must point to a definition" problems 2015-11-26 19:23:49 +00:00
FindBugs.cpp [C++] Use 'nullptr'. Tools edition. 2014-04-25 04:24:47 +00:00
ListReducer.h bugpoint: make the number of trim iterations a compile-time constant 2015-07-26 15:18:45 +00:00
LLVMBuild.txt Wrap some long lines in LLVMBuild files. NFC 2015-06-12 18:44:57 +00:00
Makefile [CodeGenPrepare] Move CodeGenPrepare into lib/CodeGen. 2014-02-22 00:07:45 +00:00
Miscompilation.cpp bugpoint: Remove implicit ilist iterator conversions, NFC 2015-10-20 19:36:39 +00:00
OptimizerDriver.cpp uselistorder: Remove the global bits 2015-04-15 03:14:06 +00:00
ToolRunner.cpp [Bugpoint] Use 'CC' instead of 'GCC' for variable naming. 2015-10-14 20:29:54 +00:00
ToolRunner.h [Bugpoint] Use 'CC' instead of 'GCC' for variable naming. 2015-10-14 20:29:54 +00:00