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

Side by Side Diff: unittest/BitcodeMunge.cpp

Issue 1766233002: Subzero: Fix symbol name mangling. Make flags global. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 4 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 | « unittest/BitcodeMunge.h ('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 15 matching lines...) Expand all
26 Flags.setOutFileType(Ice::FT_Iasm); 26 Flags.setOutFileType(Ice::FT_Iasm);
27 Flags.setTargetArch(Ice::Target_X8632); 27 Flags.setTargetArch(Ice::Target_X8632);
28 Flags.setVerbose(Ice::IceV_Instructions); 28 Flags.setVerbose(Ice::IceV_Instructions);
29 } 29 }
30 30
31 bool IceTest::SubzeroBitcodeMunger::runTest(const uint64_t Munges[], 31 bool IceTest::SubzeroBitcodeMunger::runTest(const uint64_t Munges[],
32 size_t MungeSize, 32 size_t MungeSize,
33 bool DisableTranslation) { 33 bool DisableTranslation) {
34 const bool AddHeader = true; 34 const bool AddHeader = true;
35 setupTest(Munges, MungeSize, AddHeader); 35 setupTest(Munges, MungeSize, AddHeader);
36 Ice::GlobalContext Ctx(DumpStream, DumpStream, DumpStream, nullptr, Flags); 36 Ice::GlobalContext Ctx(DumpStream, DumpStream, DumpStream, nullptr);
37 Ice::PNaClTranslator Translator(&Ctx); 37 Ice::PNaClTranslator Translator(&Ctx);
38 const char *BufferName = "Test"; 38 const char *BufferName = "Test";
39 Flags.setDisableTranslation(DisableTranslation); 39 Flags.setDisableTranslation(DisableTranslation);
40 Translator.translateBuffer(BufferName, MungedInput.get()); 40 Translator.translateBuffer(BufferName, MungedInput.get());
41 41
42 cleanupTest(); 42 cleanupTest();
43 return Translator.getErrorStatus().value() == 0; 43 return Translator.getErrorStatus().value() == 0;
44 } 44 }
45 45
46 } // end of namespace IceTest 46 } // end of namespace IceTest
OLDNEW
« no previous file with comments | « unittest/BitcodeMunge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698