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

Side by Side Diff: src/IceTargetLowering.cpp

Issue 1171563002: Subzero: Emit ARM build-attributes in the file scope (as header). (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: report_fatal Created 5 years, 6 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
« no previous file with comments | « src/IceTargetLowering.h ('k') | src/IceTargetLoweringARM32.h » ('j') | 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/IceTargetLowering.cpp - Basic lowering implementation --===// 1 //===- subzero/src/IceTargetLowering.cpp - Basic lowering implementation --===//
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 implements the skeleton of the TargetLowering class, 10 // This file implements the skeleton of the TargetLowering class,
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 Str << getConstantPrefix(); 429 Str << getConstantPrefix();
430 emitWithoutPrefix(C); 430 emitWithoutPrefix(C);
431 } 431 }
432 432
433 std::unique_ptr<TargetDataLowering> 433 std::unique_ptr<TargetDataLowering>
434 TargetDataLowering::createLowering(GlobalContext *Ctx) { 434 TargetDataLowering::createLowering(GlobalContext *Ctx) {
435 TargetArch Target = Ctx->getFlags().getTargetArch(); 435 TargetArch Target = Ctx->getFlags().getTargetArch();
436 #define SUBZERO_TARGET(X) \ 436 #define SUBZERO_TARGET(X) \
437 if (Target == Target_##X) \ 437 if (Target == Target_##X) \
438 return std::unique_ptr<TargetDataLowering>(TargetData##X::create(Ctx)); 438 return std::unique_ptr<TargetDataLowering>(TargetData##X::create(Ctx));
439 #include "llvm/Config/SZTargets.def" 439 #include "llvm/Config/SZTargets.def"
jvoung (off chromium) 2015/06/11 22:12:32 Also updated the MIPS port to have create() return
440 440
441 llvm_unreachable("Unsupported target data lowering"); 441 llvm::report_fatal_error("Unsupported target data lowering");
442 return nullptr;
443 } 442 }
444 443
445 TargetDataLowering::~TargetDataLowering() {} 444 TargetDataLowering::~TargetDataLowering() {}
446 445
446 std::unique_ptr<TargetHeaderLowering>
447 TargetHeaderLowering::createLowering(GlobalContext *Ctx) {
448 TargetArch Target = Ctx->getFlags().getTargetArch();
449 #define SUBZERO_TARGET(X) \
450 if (Target == Target_##X) \
451 return std::unique_ptr<TargetHeaderLowering>(TargetHeader##X::create(Ctx));
John 2015/06/08 23:22:27 you don't need std::unique_ptr<> here. Not that
jvoung (off chromium) 2015/06/11 22:12:32 Ah right -- Done.
452 #include "llvm/Config/SZTargets.def"
453
454 llvm::report_fatal_error("Unsupported target header lowering");
455 }
456
457 TargetHeaderLowering::~TargetHeaderLowering() {}
458
447 } // end of namespace Ice 459 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceTargetLowering.h ('k') | src/IceTargetLoweringARM32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698