diff options
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/RegisterValue.h')
| -rw-r--r-- | llvm/tools/llvm-exegesis/lib/RegisterValue.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/RegisterValue.h b/llvm/tools/llvm-exegesis/lib/RegisterValue.h index 51ea30ac8eb..689e354e241 100644 --- a/llvm/tools/llvm-exegesis/lib/RegisterValue.h +++ b/llvm/tools/llvm-exegesis/lib/RegisterValue.h @@ -14,6 +14,9 @@ /// //===----------------------------------------------------------------------===// +#ifndef LLVM_TOOLS_LLVM_EXEGESIS_REGISTERVALUE_H +#define LLVM_TOOLS_LLVM_EXEGESIS_REGISTERVALUE_H + #include <llvm/ADT/APFloat.h> #include <llvm/ADT/APInt.h> @@ -22,6 +25,7 @@ namespace exegesis { // A simple object storing the value for a particular register. struct RegisterValue { + static RegisterValue zero(unsigned Reg) { return {Reg, llvm::APInt()}; } unsigned Register; llvm::APInt Value; }; @@ -45,3 +49,5 @@ llvm::APInt bitcastFloatValue(const llvm::fltSemantics &FltSemantics, } // namespace exegesis } // namespace llvm + +#endif // LLVM_TOOLS_LLVM_EXEGESIS_REGISTERVALUE_H |

