OLD | NEW |
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 20 matching lines...) Expand all Loading... |
31 Flags.setOutFileType(Ice::FT_Iasm); | 31 Flags.setOutFileType(Ice::FT_Iasm); |
32 Flags.setTargetArch(Ice::Target_X8632); | 32 Flags.setTargetArch(Ice::Target_X8632); |
33 Flags.setVerbose(Ice::IceV_Instructions); | 33 Flags.setVerbose(Ice::IceV_Instructions); |
34 } | 34 } |
35 | 35 |
36 bool IceTest::SubzeroBitcodeMunger::runTest(const char *TestName, | 36 bool IceTest::SubzeroBitcodeMunger::runTest(const char *TestName, |
37 const uint64_t Munges[], | 37 const uint64_t Munges[], |
38 size_t MungeSize) { | 38 size_t MungeSize) { |
39 const bool AddHeader = true; | 39 const bool AddHeader = true; |
40 setupTest(TestName, Munges, MungeSize, AddHeader); | 40 setupTest(TestName, Munges, MungeSize, AddHeader); |
41 Ice::GlobalContext Ctx(DumpStream, DumpStream, nullptr, Flags); | 41 Ice::GlobalContext Ctx(DumpStream, DumpStream, DumpStream, nullptr, Flags); |
42 Ice::PNaClTranslator Translator(&Ctx); | 42 Ice::PNaClTranslator Translator(&Ctx); |
43 Translator.translateBuffer(TestName, MungedInput.get()); | 43 Translator.translateBuffer(TestName, MungedInput.get()); |
44 | 44 |
45 cleanupTest(); | 45 cleanupTest(); |
46 return Translator.getErrorStatus().value() == 0; | 46 return Translator.getErrorStatus().value() == 0; |
47 } | 47 } |
48 | 48 |
49 } // end of namespace IceTest | 49 } // end of namespace IceTest |
OLD | NEW |