mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-27 09:17:11 +00:00 
			
		
		
		
	MSVC doesn't understand it, and it wasn't really necessary anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203709 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			57 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			57 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| //=-- ProfileData.h - Instrumented profiling format support -------*- C++ -*-=//
 | |
| //
 | |
| //                     The LLVM Compiler Infrastructure
 | |
| //
 | |
| // This file is distributed under the University of Illinois Open Source
 | |
| // License. See LICENSE.TXT for details.
 | |
| //
 | |
| //===----------------------------------------------------------------------===//
 | |
| //
 | |
| // This file contains support for instrumentation based PGO and coverage.
 | |
| //
 | |
| //===----------------------------------------------------------------------===//
 | |
| 
 | |
| #ifndef LLVM_PROFILE_PROFILEDATA_H__
 | |
| #define LLVM_PROFILE_PROFILEDATA_H__
 | |
| 
 | |
| #include "llvm/Support/DataTypes.h"
 | |
| #include "llvm/Support/system_error.h"
 | |
| 
 | |
| #include <vector>
 | |
| 
 | |
| namespace llvm {
 | |
| 
 | |
| const char PROFILEDATA_MAGIC[4] = {'L', 'P', 'R', 'F'};
 | |
| const uint32_t PROFILEDATA_VERSION = 1;
 | |
| const uint32_t PROFILEDATA_HEADER_SIZE = 24;
 | |
| 
 | |
| const error_category &profiledata_category();
 | |
| 
 | |
| struct profiledata_error {
 | |
|   enum ErrorType {
 | |
|     success = 0,
 | |
|     bad_magic,
 | |
|     unsupported_version,
 | |
|     too_large,
 | |
|     truncated,
 | |
|     malformed,
 | |
|     unknown_function
 | |
|   };
 | |
|   ErrorType V;
 | |
| 
 | |
|   profiledata_error(ErrorType V) : V(V) {}
 | |
|   operator ErrorType() const { return V; }
 | |
| };
 | |
| 
 | |
| inline error_code make_error_code(profiledata_error E) {
 | |
|   return error_code(static_cast<int>(E), profiledata_category());
 | |
| }
 | |
| 
 | |
| template <> struct is_error_code_enum<profiledata_error> : std::true_type {};
 | |
| template <> struct is_error_code_enum<profiledata_error::ErrorType>
 | |
|   : std::true_type {};
 | |
| 
 | |
| } // end namespace llvm
 | |
| 
 | |
| #endif // LLVM_PROFILE_PROFILEDATA_H__
 |