Summary: Before we would convert it to string in `Reporting` and pass it to `Errlog` which would use it only to 'log events'. I guess the reason is that there was a cyclic dependency between `Errlog` and `clang_method_kind` defined in `ProcAttributes`. This diff: - moves it to its own module - defers the conversion to string Reviewed By: jvillard Differential Revision: D9332819 fbshipit-source-id: 43a028b61master
parent
451f8f1efa
commit
2ee4b5da18
@ -0,0 +1,27 @@
|
|||||||
|
(*
|
||||||
|
* Copyright (c) 2018-present, Facebook, Inc.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*)
|
||||||
|
|
||||||
|
open! IStd
|
||||||
|
|
||||||
|
type t = CPP_INSTANCE | OBJC_INSTANCE | CPP_CLASS | OBJC_CLASS | BLOCK | C_FUNCTION
|
||||||
|
[@@deriving compare]
|
||||||
|
|
||||||
|
let equal = [%compare.equal : t]
|
||||||
|
|
||||||
|
let to_string = function
|
||||||
|
| CPP_INSTANCE ->
|
||||||
|
"CPP_INSTANCE"
|
||||||
|
| OBJC_INSTANCE ->
|
||||||
|
"OBJC_INSTANCE"
|
||||||
|
| CPP_CLASS ->
|
||||||
|
"CPP_CLASS"
|
||||||
|
| OBJC_CLASS ->
|
||||||
|
"OBJC_CLASS"
|
||||||
|
| BLOCK ->
|
||||||
|
"BLOCK"
|
||||||
|
| C_FUNCTION ->
|
||||||
|
"C_FUNCTION"
|
@ -0,0 +1,15 @@
|
|||||||
|
(*
|
||||||
|
* Copyright (c) 2018-present, Facebook, Inc.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*)
|
||||||
|
|
||||||
|
open! IStd
|
||||||
|
|
||||||
|
type t = CPP_INSTANCE | OBJC_INSTANCE | CPP_CLASS | OBJC_CLASS | BLOCK | C_FUNCTION
|
||||||
|
[@@deriving compare]
|
||||||
|
|
||||||
|
val equal : t -> t -> bool
|
||||||
|
|
||||||
|
val to_string : t -> string
|
Loading…
Reference in new issue