Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(427)

Side by Side Diff: src/llvm2ice.cpp

Issue 622443002: Subzero: Change llvm::OwningPtr to C++11's std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Remove ErrorOr for now Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/PNaClTranslator.cpp ('K') | « src/PNaClTranslator.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/llvm2ice.cpp - Driver for testing ----------------------===// 1 //===- subzero/src/llvm2ice.cpp - Driver for testing ----------------------===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file defines a driver that uses LLVM capabilities to parse a 10 // This file defines a driver that uses LLVM capabilities to parse a
11 // bitcode file and build the LLVM IR, and then convert the LLVM basic 11 // bitcode file and build the LLVM IR, and then convert the LLVM basic
12 // blocks, instructions, and operands into their Subzero equivalents. 12 // blocks, instructions, and operands into their Subzero equivalents.
13 // 13 //
14 //===----------------------------------------------------------------------===// 14 //===----------------------------------------------------------------------===//
15 15
16 #include "IceCfg.h" 16 #include <fstream>
17 #include "IceClFlags.h" 17 #include <iostream>
18 #include "IceConverter.h"
19 #include "PNaClTranslator.h"
20 18
21 #include "llvm/IR/LLVMContext.h" 19 #include "llvm/IR/LLVMContext.h"
22 #include "llvm/IRReader/IRReader.h" 20 #include "llvm/IRReader/IRReader.h"
23 #include "llvm/Support/CommandLine.h" 21 #include "llvm/Support/CommandLine.h"
24 #include "llvm/Support/raw_os_ostream.h" 22 #include "llvm/Support/raw_os_ostream.h"
25 #include "llvm/Support/SourceMgr.h" 23 #include "llvm/Support/SourceMgr.h"
26 24
27 #include <fstream> 25 #include "IceCfg.h"
28 #include <iostream> 26 #include "IceClFlags.h"
27 #include "IceConverter.h"
28 #include "PNaClTranslator.h"
29 29
30 using namespace llvm; 30 using namespace llvm;
31 31
32 static cl::list<Ice::VerboseItem> VerboseList( 32 static cl::list<Ice::VerboseItem> VerboseList(
33 "verbose", cl::CommaSeparated, 33 "verbose", cl::CommaSeparated,
34 cl::desc("Verbose options (can be comma-separated):"), 34 cl::desc("Verbose options (can be comma-separated):"),
35 cl::values( 35 cl::values(
36 clEnumValN(Ice::IceV_Instructions, "inst", "Print basic instructions"), 36 clEnumValN(Ice::IceV_Instructions, "inst", "Print basic instructions"),
37 clEnumValN(Ice::IceV_Deleted, "del", "Include deleted instructions"), 37 clEnumValN(Ice::IceV_Deleted, "del", "Include deleted instructions"),
38 clEnumValN(Ice::IceV_InstNumbers, "instnum", 38 clEnumValN(Ice::IceV_InstNumbers, "instnum",
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 Ice::Converter Converter(Mod, &Ctx, Flags); 198 Ice::Converter Converter(Mod, &Ctx, Flags);
199 Converter.convertToIce(); 199 Converter.convertToIce();
200 ErrorStatus = Converter.getErrorStatus(); 200 ErrorStatus = Converter.getErrorStatus();
201 } 201 }
202 if (SubzeroTimingEnabled) 202 if (SubzeroTimingEnabled)
203 Ctx.dumpTimers(); 203 Ctx.dumpTimers();
204 const bool FinalStats = true; 204 const bool FinalStats = true;
205 Ctx.dumpStats("_FINAL_", FinalStats); 205 Ctx.dumpStats("_FINAL_", FinalStats);
206 return ErrorStatus; 206 return ErrorStatus;
207 } 207 }
OLDNEW
« src/PNaClTranslator.cpp ('K') | « src/PNaClTranslator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698