blob: 65af2fb57197b4aa73a569d30e8f42b3c0fddcb4 [file] [log] [blame]
Ian Rogersc8b306f2012-02-17 21:34:44 -08001/*
2 * Copyright 2012 Google Inc. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "constants.h"
18
19namespace art {
20
Elliott Hughesed64e8d2012-03-02 20:37:45 -080021std::ostream& operator<<(std::ostream& os, const InstructionSet& rhs) {
22 switch (rhs) {
23 case kNone: os << "none"; break;
24 case kArm: os << "ARM"; break;
25 case kThumb2: os << "Thumb2"; break;
26 case kX86: os << "x86"; break;
27 case kMips: os << "MIPS"; break;
28 default: os << "InstructionSet[" << static_cast<int>(rhs) << "]"; break;
29 }
30 return os;
31}
32
Ian Rogersc8b306f2012-02-17 21:34:44 -080033std::ostream& operator<<(std::ostream& os, const InvokeType& rhs) {
34 switch (rhs) {
35 case kStatic: os << "static"; break;
36 case kDirect: os << "direct"; break;
37 case kVirtual: os << "virtual"; break;
38 case kSuper: os << "super"; break;
39 case kInterface: os << "interface"; break;
40 default: os << "InvokeType[" << static_cast<int>(rhs) << "]"; break;
41 }
42 return os;
43}
44
45} // namespace art