Ian Rogers | c8b306f | 2012-02-17 21:34:44 -0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 19 | namespace art { |
| 20 | |
Elliott Hughes | ed64e8d | 2012-03-02 20:37:45 -0800 | [diff] [blame] | 21 | std::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 Rogers | c8b306f | 2012-02-17 21:34:44 -0800 | [diff] [blame] | 33 | std::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 |