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

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: use class final, fix for mips32 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
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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 Ostream &Str = Ctx->getStrEmit(); 430 Ostream &Str = Ctx->getStrEmit();
431 Str << getConstantPrefix(); 431 Str << getConstantPrefix();
432 emitWithoutPrefix(C); 432 emitWithoutPrefix(C);
433 } 433 }
434 434
435 std::unique_ptr<TargetDataLowering> 435 std::unique_ptr<TargetDataLowering>
436 TargetDataLowering::createLowering(GlobalContext *Ctx) { 436 TargetDataLowering::createLowering(GlobalContext *Ctx) {
437 TargetArch Target = Ctx->getFlags().getTargetArch(); 437 TargetArch Target = Ctx->getFlags().getTargetArch();
438 #define SUBZERO_TARGET(X) \ 438 #define SUBZERO_TARGET(X) \
439 if (Target == Target_##X) \ 439 if (Target == Target_##X) \
440 return std::unique_ptr<TargetDataLowering>(TargetData##X::create(Ctx)); 440 return TargetData##X::create(Ctx);
441 #include "llvm/Config/SZTargets.def" 441 #include "llvm/Config/SZTargets.def"
442 442
443 llvm_unreachable("Unsupported target data lowering"); 443 llvm::report_fatal_error("Unsupported target data lowering");
444 return nullptr;
445 } 444 }
446 445
447 TargetDataLowering::~TargetDataLowering() {} 446 TargetDataLowering::~TargetDataLowering() {}
448 447
448 std::unique_ptr<TargetHeaderLowering>
449 TargetHeaderLowering::createLowering(GlobalContext *Ctx) {
450 TargetArch Target = Ctx->getFlags().getTargetArch();
451 #define SUBZERO_TARGET(X) \
452 if (Target == Target_##X) \
453 return TargetHeader##X::create(Ctx);
454 #include "llvm/Config/SZTargets.def"
455
456 llvm::report_fatal_error("Unsupported target header lowering");
457 }
458
459 TargetHeaderLowering::~TargetHeaderLowering() {}
460
449 } // end of namespace Ice 461 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698