diff options
| author | Saleem Abdulrasool <compnerd@compnerd.org> | 2018-05-03 04:45:43 +0000 | 
|---|---|---|
| committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2018-05-03 04:45:43 +0000 | 
| commit | cc2da59f6920c8b4893713d768ea23242f796ad5 (patch) | |
| tree | 2b48ac2a3bbb360aec420d5137d21dcd00a15342 /llvm/utils/lit | |
| parent | 800508b82580fc816ec3ab75dc5cbc8f05260c0c (diff) | |
| download | bcm5719-llvm-cc2da59f6920c8b4893713d768ea23242f796ad5.tar.gz bcm5719-llvm-cc2da59f6920c8b4893713d768ea23242f796ad5.zip | |
lit: flesh out `SubsituteCaptures` further
Add overloads for `__len__` and `__getitem__` to allow use of this class
on Linux as well as Windows.  With these overloads, lit can be used on
both hosts for the swift testsuite.
llvm-svn: 331431
Diffstat (limited to 'llvm/utils/lit')
| -rw-r--r-- | llvm/utils/lit/lit/TestingConfig.py | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/llvm/utils/lit/lit/TestingConfig.py b/llvm/utils/lit/lit/TestingConfig.py index 713baa620a7..3167974080d 100644 --- a/llvm/utils/lit/lit/TestingConfig.py +++ b/llvm/utils/lit/lit/TestingConfig.py @@ -171,3 +171,9 @@ class SubstituteCaptures:      def __str__(self):          return self.substitution +    def __len__(self): +        return len(self.substitution) + +    def __getitem__(self, item): +        return self.substitution.__getitem__(item) + | 

