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

Side by Side Diff: unittest/BitcodeMunge.cpp

Issue 1024203002: Move some flag-like props from GlobalContext and TargetLowering to ClFlags. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: review / clean up formatting Created 5 years, 9 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/main.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 //===- BitcodeMunge.cpp - Subzero Bitcode Munger ----------------*- C++ -*-===// 1 //===- BitcodeMunge.cpp - Subzero Bitcode Munger ----------------*- C++ -*-===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
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 // Test harness for testing malformed bitcode files in Subzero. 10 // Test harness for testing malformed bitcode files in Subzero.
(...skipping 10 matching lines...) Expand all
21 21
22 bool IceTest::SubzeroBitcodeMunger::runTest(const char *TestName, 22 bool IceTest::SubzeroBitcodeMunger::runTest(const char *TestName,
23 const uint64_t Munges[], 23 const uint64_t Munges[],
24 size_t MungeSize) { 24 size_t MungeSize) {
25 const bool AddHeader = true; 25 const bool AddHeader = true;
26 setupTest(TestName, Munges, MungeSize, AddHeader); 26 setupTest(TestName, Munges, MungeSize, AddHeader);
27 27
28 Ice::ClFlags Flags; 28 Ice::ClFlags Flags;
29 Flags.setAllowErrorRecovery(true); 29 Flags.setAllowErrorRecovery(true);
30 Flags.setGenerateUnitTestMessages(true); 30 Flags.setGenerateUnitTestMessages(true);
31 Flags.setOptLevel(Ice::Opt_m1);
31 Flags.setOutFileType(Ice::FT_Iasm); 32 Flags.setOutFileType(Ice::FT_Iasm);
32 Ice::GlobalContext Ctx(DumpStream, DumpStream, nullptr, 33 Flags.setTargetArch(Ice::Target_X8632);
33 Ice::IceV_Instructions, Ice::Target_X8632, Ice::Opt_m1, 34 Flags.setVerbose(Ice::IceV_Instructions);
34 "", Flags); 35 Ice::GlobalContext Ctx(DumpStream, DumpStream, nullptr, Flags);
35 Ice::PNaClTranslator Translator(&Ctx); 36 Ice::PNaClTranslator Translator(&Ctx);
36 Translator.translateBuffer(TestName, MungedInput.get()); 37 Translator.translateBuffer(TestName, MungedInput.get());
37 38
38 cleanupTest(); 39 cleanupTest();
39 return Translator.getErrorStatus().value() == 0; 40 return Translator.getErrorStatus().value() == 0;
40 } 41 }
41 42
42 } // end of namespace IceTest 43 } // end of namespace IceTest
OLDNEW
« no previous file with comments | « src/main.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698