diff options
Diffstat (limited to 'lldb/test/Shell/ScriptInterpreter/Python/Inputs/FormatterBytecode/MyOptional.cpp')
| -rw-r--r-- | lldb/test/Shell/ScriptInterpreter/Python/Inputs/FormatterBytecode/MyOptional.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/lldb/test/Shell/ScriptInterpreter/Python/Inputs/FormatterBytecode/MyOptional.cpp b/lldb/test/Shell/ScriptInterpreter/Python/Inputs/FormatterBytecode/MyOptional.cpp deleted file mode 100644 index abba34439d88..000000000000 --- a/lldb/test/Shell/ScriptInterpreter/Python/Inputs/FormatterBytecode/MyOptional.cpp +++ /dev/null @@ -1,23 +0,0 @@ -// A bare-bones llvm::Optional reimplementation. - -template <typename T> struct MyOptionalStorage { - MyOptionalStorage(T val) : value(val), hasVal(true) {} - MyOptionalStorage() {} - T value; - bool hasVal = false; -}; - -template <typename T> struct MyOptional { - MyOptionalStorage<T> Storage; - MyOptional(T val) : Storage(val) {} - MyOptional() {} - T &operator*() { return Storage.value; } -}; - -void stop() {} - -int main(int argc, char **argv) { - MyOptional<int> x, y = 42; - stop(); // break here - return *y; -} |
