mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-31 08:16:47 +00:00 
			
		
		
		
	Force anything that #includes llvm/Transforms/Utils/UnifyFunctionExitNodes.h
to link in the implementation. Thanks to Anton Korobeynikov for figuring out what was going on here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28660 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		| @@ -38,10 +38,16 @@ public: | |||||||
|   BasicBlock *getUnreachableBlock() const { return UnreachableBlock; } |   BasicBlock *getUnreachableBlock() const { return UnreachableBlock; } | ||||||
|  |  | ||||||
|   virtual bool runOnFunction(Function &F); |   virtual bool runOnFunction(Function &F); | ||||||
|  |    | ||||||
|  |   // Force linking the impl of this class into anything that uses this header. | ||||||
|  |   static int stub; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| Pass *createUnifyFunctionExitNodesPass(); | Pass *createUnifyFunctionExitNodesPass(); | ||||||
|  |  | ||||||
|  | static IncludeFile | ||||||
|  | UNIFY_FUNCTION_EXIT_NODES_INCLUDE_FILE(&UnifyFunctionExitNodes::stub); | ||||||
|  |  | ||||||
| } // End llvm namespace | } // End llvm namespace | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -25,6 +25,8 @@ using namespace llvm; | |||||||
| static RegisterOpt<UnifyFunctionExitNodes> | static RegisterOpt<UnifyFunctionExitNodes> | ||||||
| X("mergereturn", "Unify function exit nodes"); | X("mergereturn", "Unify function exit nodes"); | ||||||
|  |  | ||||||
|  | int UnifyFunctionExitNodes::stub; | ||||||
|  |  | ||||||
| Pass *llvm::createUnifyFunctionExitNodesPass() { | Pass *llvm::createUnifyFunctionExitNodesPass() { | ||||||
|   return new UnifyFunctionExitNodes(); |   return new UnifyFunctionExitNodes(); | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user