[PATCH] D29209: Use copy.deepcopy instead of doing it manually.
This revision was automatically updated to reflect the committed changes. Closed by commit rL294350: Use copy.deepcopy instead of doing it manually. (authored by danalbert). Changed prior to commit: https://reviews.llvm.org/D29209?vs=85999=87507#toc Repository: rL LLVM https://reviews.llvm.org/D29209 Files: libcxx/trunk/test/libcxx/compiler.py libcxx/trunk/test/libcxx/test/format.py Index: libcxx/trunk/test/libcxx/test/format.py === --- libcxx/trunk/test/libcxx/test/format.py +++ libcxx/trunk/test/libcxx/test/format.py @@ -7,6 +7,7 @@ # #===--===## +import copy import errno import os import time @@ -36,7 +37,7 @@ def __init__(self, cxx, use_verify_for_fail, execute_external, executor, exec_env): -self.cxx = cxx.copy() +self.cxx = copy.deepcopy(cxx) self.use_verify_for_fail = use_verify_for_fail self.execute_external = execute_external self.executor = executor @@ -115,7 +116,7 @@ tmpBase) script = lit.TestRunner.applySubstitutions(script, substitutions) -test_cxx = self.cxx.copy() +test_cxx = copy.deepcopy(self.cxx) if is_fail_test: test_cxx.useCCache(False) test_cxx.useWarnings(False) Index: libcxx/trunk/test/libcxx/compiler.py === --- libcxx/trunk/test/libcxx/compiler.py +++ libcxx/trunk/test/libcxx/compiler.py @@ -49,18 +49,6 @@ if self.type is None or self.version is None: self._initTypeAndVersion() -def copy(self): -new_cxx = CXXCompiler( -self.path, flags=self.flags, compile_flags=self.compile_flags, -link_flags=self.link_flags, warning_flags=self.warning_flags, -verify_supported=self.verify_supported, -verify_flags=self.verify_flags, use_verify=self.use_verify, -modules_flags=self.modules_flags, use_modules=self.use_modules, -use_ccache=self.use_ccache, use_warnings=self.use_warnings, -compile_env=self.compile_env, cxx_type=self.type, -cxx_version=self.version) -return new_cxx - def isVerifySupported(self): if self.verify_supported is None: self.verify_supported = self.hasCompileFlag(['-Xclang', Index: libcxx/trunk/test/libcxx/test/format.py === --- libcxx/trunk/test/libcxx/test/format.py +++ libcxx/trunk/test/libcxx/test/format.py @@ -7,6 +7,7 @@ # #===--===## +import copy import errno import os import time @@ -36,7 +37,7 @@ def __init__(self, cxx, use_verify_for_fail, execute_external, executor, exec_env): -self.cxx = cxx.copy() +self.cxx = copy.deepcopy(cxx) self.use_verify_for_fail = use_verify_for_fail self.execute_external = execute_external self.executor = executor @@ -115,7 +116,7 @@ tmpBase) script = lit.TestRunner.applySubstitutions(script, substitutions) -test_cxx = self.cxx.copy() +test_cxx = copy.deepcopy(self.cxx) if is_fail_test: test_cxx.useCCache(False) test_cxx.useWarnings(False) Index: libcxx/trunk/test/libcxx/compiler.py === --- libcxx/trunk/test/libcxx/compiler.py +++ libcxx/trunk/test/libcxx/compiler.py @@ -49,18 +49,6 @@ if self.type is None or self.version is None: self._initTypeAndVersion() -def copy(self): -new_cxx = CXXCompiler( -self.path, flags=self.flags, compile_flags=self.compile_flags, -link_flags=self.link_flags, warning_flags=self.warning_flags, -verify_supported=self.verify_supported, -verify_flags=self.verify_flags, use_verify=self.use_verify, -modules_flags=self.modules_flags, use_modules=self.use_modules, -use_ccache=self.use_ccache, use_warnings=self.use_warnings, -compile_env=self.compile_env, cxx_type=self.type, -cxx_version=self.version) -return new_cxx - def isVerifySupported(self): if self.verify_supported is None: self.verify_supported = self.hasCompileFlag(['-Xclang', ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D29209: Use copy.deepcopy instead of doing it manually.
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. This LGTM. Repository: rL LLVM https://reviews.llvm.org/D29209 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D29209: Use copy.deepcopy instead of doing it manually.
danalbert created this revision. Repository: rL LLVM https://reviews.llvm.org/D29209 Files: test/libcxx/compiler.py test/libcxx/test/format.py Index: test/libcxx/test/format.py === --- test/libcxx/test/format.py +++ test/libcxx/test/format.py @@ -7,6 +7,7 @@ # #===--===## +import copy import errno import os import time @@ -36,7 +37,7 @@ def __init__(self, cxx, use_verify_for_fail, execute_external, executor, exec_env): -self.cxx = cxx.copy() +self.cxx = copy.deepcopy(cxx) self.use_verify_for_fail = use_verify_for_fail self.execute_external = execute_external self.executor = executor @@ -115,7 +116,7 @@ tmpBase) script = lit.TestRunner.applySubstitutions(script, substitutions) -test_cxx = self.cxx.copy() +test_cxx = copy.deepcopy(self.cxx) if is_fail_test: test_cxx.useCCache(False) test_cxx.useWarnings(False) Index: test/libcxx/compiler.py === --- test/libcxx/compiler.py +++ test/libcxx/compiler.py @@ -49,18 +49,6 @@ if self.type is None or self.version is None: self._initTypeAndVersion() -def copy(self): -new_cxx = CXXCompiler( -self.path, flags=self.flags, compile_flags=self.compile_flags, -link_flags=self.link_flags, warning_flags=self.warning_flags, -verify_supported=self.verify_supported, -verify_flags=self.verify_flags, use_verify=self.use_verify, -modules_flags=self.modules_flags, use_modules=self.use_modules, -use_ccache=self.use_ccache, use_warnings=self.use_warnings, -compile_env=self.compile_env, cxx_type=self.type, -cxx_version=self.version) -return new_cxx - def isVerifySupported(self): if self.verify_supported is None: self.verify_supported = self.hasCompileFlag(['-Xclang', Index: test/libcxx/test/format.py === --- test/libcxx/test/format.py +++ test/libcxx/test/format.py @@ -7,6 +7,7 @@ # #===--===## +import copy import errno import os import time @@ -36,7 +37,7 @@ def __init__(self, cxx, use_verify_for_fail, execute_external, executor, exec_env): -self.cxx = cxx.copy() +self.cxx = copy.deepcopy(cxx) self.use_verify_for_fail = use_verify_for_fail self.execute_external = execute_external self.executor = executor @@ -115,7 +116,7 @@ tmpBase) script = lit.TestRunner.applySubstitutions(script, substitutions) -test_cxx = self.cxx.copy() +test_cxx = copy.deepcopy(self.cxx) if is_fail_test: test_cxx.useCCache(False) test_cxx.useWarnings(False) Index: test/libcxx/compiler.py === --- test/libcxx/compiler.py +++ test/libcxx/compiler.py @@ -49,18 +49,6 @@ if self.type is None or self.version is None: self._initTypeAndVersion() -def copy(self): -new_cxx = CXXCompiler( -self.path, flags=self.flags, compile_flags=self.compile_flags, -link_flags=self.link_flags, warning_flags=self.warning_flags, -verify_supported=self.verify_supported, -verify_flags=self.verify_flags, use_verify=self.use_verify, -modules_flags=self.modules_flags, use_modules=self.use_modules, -use_ccache=self.use_ccache, use_warnings=self.use_warnings, -compile_env=self.compile_env, cxx_type=self.type, -cxx_version=self.version) -return new_cxx - def isVerifySupported(self): if self.verify_supported is None: self.verify_supported = self.hasCompileFlag(['-Xclang', ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits