[coco] Introduce factory method for Module (#756)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Mon, 23 Jul 2018 05:10:45 +0000 (14:10 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Mon, 23 Jul 2018 05:10:45 +0000 (14:10 +0900)
commitd47ec4e15b21eff6049a8dd7484077d3c0ebd8b3
treeaa2840dfac255c08a051349f3fdafe28084e5e55
parent70abdeb2fd90b91df8871979307c414455ae4597
[coco] Introduce factory method for Module (#756)

Several memory allocations are necessary to construct a module object
currently, which may throw an exception.

This commit extracts all of memory allocations from constructor.

To extract memory allocations from constructor, this commit introduces
tow major changes over Module class design:
- Rewrite Module as pure virtual interface
- Introduce factory method

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
contrib/coco/core/include/coco/IR/Module.h
contrib/coco/core/src/IR/Module.cpp
contrib/coco/core/src/IR/Module.test.cpp