1 //===- TypeServerHandler.h --------------------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef LLVM_DEBUGINFO_CODEVIEW_TYPESERVERHANDLER_H 11 #define LLVM_DEBUGINFO_CODEVIEW_TYPESERVERHANDLER_H 12 13 #include "llvm/DebugInfo/CodeView/TypeRecord.h" 14 #include "llvm/Support/Error.h" 15 16 namespace llvm { 17 namespace codeview { 18 class TypeVisitorCallbacks; 19 20 class TypeServerHandler { 21 public: 22 virtual ~TypeServerHandler() {} 23 24 /// Handle a TypeServer record. If the implementation returns true 25 /// the record will not be processed by the top-level visitor. If 26 /// it returns false, it will be processed. If it returns an Error, 27 /// then the top-level visitor will fail. 28 virtual Expected<bool> handle(TypeServer2Record &TS, 29 TypeVisitorCallbacks &Callbacks) { 30 return false; 31 } 32 }; 33 } 34 } 35 36 #endif 37