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

Side by Side Diff: src/PNaClTranslator.cpp

Issue 1674033002: Subzero: Clean up some uses of *_cast<>. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Cleanup of llvm::cast<> style operations Created 4 years, 10 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/IceTargetLoweringX86BaseImpl.h ('K') | « src/IceTypes.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/PNaClTranslator.cpp - ICE from bitcode -----------------===// 1 //===- subzero/src/PNaClTranslator.cpp - ICE from bitcode -----------------===//
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 /// \file 10 /// \file
(...skipping 2719 matching lines...) Expand 10 before | Expand all | Expand 10 after
2730 CallingConv::ID CallingConv; 2730 CallingConv::ID CallingConv;
2731 if (!naclbitc::DecodeCallingConv(CCInfo >> 1, CallingConv)) { 2731 if (!naclbitc::DecodeCallingConv(CCInfo >> 1, CallingConv)) {
2732 std::string Buffer; 2732 std::string Buffer;
2733 raw_string_ostream StrBuf(Buffer); 2733 raw_string_ostream StrBuf(Buffer);
2734 StrBuf << "Function call calling convention value " << (CCInfo >> 1) 2734 StrBuf << "Function call calling convention value " << (CCInfo >> 1)
2735 << " not understood."; 2735 << " not understood.";
2736 Error(StrBuf.str()); 2736 Error(StrBuf.str());
2737 appendErrorInstruction(ReturnType); 2737 appendErrorInstruction(ReturnType);
2738 return; 2738 return;
2739 } 2739 }
2740 bool IsTailCall = static_cast<bool>(CCInfo & 1); 2740 auto IsTailCall = static_cast<bool>(CCInfo & 1);
John 2016/02/07 16:18:33 bool IsTailCall = ...; While at this, const?
Jim Stichnoth 2016/02/07 17:44:41 Done.
2741 2741
2742 // Create the call instruction. 2742 // Create the call instruction.
2743 Ice::Variable *Dest = (ReturnType == Ice::IceType_void) 2743 Ice::Variable *Dest = (ReturnType == Ice::IceType_void)
2744 ? nullptr 2744 ? nullptr
2745 : getNextInstVar(ReturnType); 2745 : getNextInstVar(ReturnType);
2746 std::unique_ptr<Ice::InstCall> Instr; 2746 std::unique_ptr<Ice::InstCall> Instr;
2747 if (IntrinsicInfo) { 2747 if (IntrinsicInfo) {
2748 Instr.reset(Ice::InstIntrinsicCall::create( 2748 Instr.reset(Ice::InstIntrinsicCall::create(
2749 Func.get(), Params.size(), Dest, Callee, IntrinsicInfo->Info)); 2749 Func.get(), Params.size(), Dest, Callee, IntrinsicInfo->Info));
2750 } else { 2750 } else {
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
3203 raw_string_ostream StrBuf(Buffer); 3203 raw_string_ostream StrBuf(Buffer);
3204 StrBuf << IRFilename << ": Does not contain a module!"; 3204 StrBuf << IRFilename << ": Does not contain a module!";
3205 llvm::report_fatal_error(StrBuf.str()); 3205 llvm::report_fatal_error(StrBuf.str());
3206 } 3206 }
3207 if (InputStreamFile.getBitcodeBytes().getExtent() % 4 != 0) { 3207 if (InputStreamFile.getBitcodeBytes().getExtent() % 4 != 0) {
3208 llvm::report_fatal_error("Bitcode stream should be a multiple of 4 bytes"); 3208 llvm::report_fatal_error("Bitcode stream should be a multiple of 4 bytes");
3209 } 3209 }
3210 } 3210 }
3211 3211
3212 } // end of namespace Ice 3212 } // end of namespace Ice
OLDNEW
« src/IceTargetLoweringX86BaseImpl.h ('K') | « src/IceTypes.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698