Replace pass with rais NotImplemented in each abstact method

The methods themselfes do nothing within the abstract base class
mbedToolchain. This change enforces that toolchains do not call
these methods that contain no implementation.
pull/2173/head
Jimmy Brisson 2016-07-15 10:17:35 -05:00
parent 69eb3cabc8
commit 4fc8c56410
1 changed files with 9 additions and 9 deletions

View File

@ -792,7 +792,7 @@ class mbedToolchain:
"""Take in a dependency file generated by the compiler and build a list of
all files that the dep_path depends on.
"""
pass
raise NotImplemented
def is_not_supported_error(self, output):
return "#error directive: [NOT_SUPPORTED]" in output
@ -801,7 +801,7 @@ class mbedToolchain:
def parse_output(self, output):
"""Take in compiler output and extract sinlge line warnings and errors from it
"""
pass
raise NotImplemented
def compile_output(self, output=[]):
_rc = output[0]
@ -979,7 +979,7 @@ class mbedToolchain:
"""Generate the compiler option that forces the inclusion of the configuration
header file.
"""
pass
raise NotImplemented
@abstractmethod
def assemble(self, source, object, includes):
@ -988,7 +988,7 @@ class mbedToolchain:
- Puts the results into the file named *object*.
- Has an include search path that includes everything in *includes*
"""
pass
raise NotImplemented
@abstractmethod
def compile_c(self, source, object, includes):
@ -997,7 +997,7 @@ class mbedToolchain:
- Puts the results into the file named *object*.
- Has an include search path that includes everything in *includes*
"""
pass
raise NotImplemented
@abstractmethod
def compile_cpp(self, source, object, includes):
@ -1006,7 +1006,7 @@ class mbedToolchain:
- Puts the results into the file named *object*.
- Has an include search path that includes everything in *includes*
"""
pass
raise NotImplemented
@abstractmethod
def link(self, output, objects, libraries, lib_dirs, mem_map):
@ -1016,20 +1016,20 @@ class mbedToolchain:
- Searches for libraries in *lib_dirs*
- Generates a memory map file in the file *mem_map*
"""
pass
raise NotImplemented
@abstractmethod
def archive(self, objects, lib_path):
"""Run the command line that creates an archive containing *objects*, and named *lib_path*
"""
pass
raise NotImplemented
@abstractmethod
def binary(self, resources, elf, bin):
"""Run the command line that will Extract a binary named *bin* from an
elf file named *elf*.
"""
pass
raise NotImplemented
# Return the list of macros geenrated by the build system
def get_config_macros(self):