1b5c496346f19cba410b3191b9c3297507bba854aJosh Gao/* 2b5c496346f19cba410b3191b9c3297507bba854aJosh Gao * Copyright (C) 2016 The Android Open Source Project 3b5c496346f19cba410b3191b9c3297507bba854aJosh Gao * 4b5c496346f19cba410b3191b9c3297507bba854aJosh Gao * Licensed under the Apache License, Version 2.0 (the "License"); 5b5c496346f19cba410b3191b9c3297507bba854aJosh Gao * you may not use this file except in compliance with the License. 6b5c496346f19cba410b3191b9c3297507bba854aJosh Gao * You may obtain a copy of the License at 7b5c496346f19cba410b3191b9c3297507bba854aJosh Gao * 8b5c496346f19cba410b3191b9c3297507bba854aJosh Gao * http://www.apache.org/licenses/LICENSE-2.0 9b5c496346f19cba410b3191b9c3297507bba854aJosh Gao * 10b5c496346f19cba410b3191b9c3297507bba854aJosh Gao * Unless required by applicable law or agreed to in writing, software 11b5c496346f19cba410b3191b9c3297507bba854aJosh Gao * distributed under the License is distributed on an "AS IS" BASIS, 12b5c496346f19cba410b3191b9c3297507bba854aJosh Gao * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13b5c496346f19cba410b3191b9c3297507bba854aJosh Gao * See the License for the specific language governing permissions and 14b5c496346f19cba410b3191b9c3297507bba854aJosh Gao * limitations under the License. 15b5c496346f19cba410b3191b9c3297507bba854aJosh Gao */ 16b5c496346f19cba410b3191b9c3297507bba854aJosh Gao 17b5c496346f19cba410b3191b9c3297507bba854aJosh Gao#include "CompilationType.h" 18b5c496346f19cba410b3191b9c3297507bba854aJosh Gao 19b5c496346f19cba410b3191b9c3297507bba854aJosh Gao#include <sstream> 20b5c496346f19cba410b3191b9c3297507bba854aJosh Gao#include <string> 21b5c496346f19cba410b3191b9c3297507bba854aJosh Gao 22b5c496346f19cba410b3191b9c3297507bba854aJosh Gaostd::string to_string(const CompilationType& type) { 23b5c496346f19cba410b3191b9c3297507bba854aJosh Gao std::stringstream ss; 24ab25d0bd102f844338d7a4e0fb24e7f24d435e67Josh Gao ss << to_string(type.arch) << "-" << type.api_level << " [" << (type.cpp ? "c++" : "c") 25ab25d0bd102f844338d7a4e0fb24e7f24d435e67Josh Gao << ", fob = " << type.file_offset_bits << "]"; 26b5c496346f19cba410b3191b9c3297507bba854aJosh Gao return ss.str(); 27b5c496346f19cba410b3191b9c3297507bba854aJosh Gao} 28