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

Side by Side Diff: unittest/BitcodeMunge.cpp

Issue 877003003: Subzero: Use a "known" version of clang-format. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add a clang-format blacklist. Fix formatting "errors". Created 5 years, 10 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') | unittest/IceParseInstsTest.cpp » ('j') | 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.
11 // 11 //
12 //===----------------------------------------------------------------------===// 12 //===----------------------------------------------------------------------===//
13 13
14 #include "BitcodeMunge.h" 14 #include "BitcodeMunge.h"
15 #include "IceCfg.h" 15 #include "IceCfg.h"
16 #include "IceClFlags.h" 16 #include "IceClFlags.h"
17 #include "PNaClTranslator.h" 17 #include "PNaClTranslator.h"
18 #include "IceTypes.h" 18 #include "IceTypes.h"
19 19
20 namespace IceTest { 20 namespace IceTest {
21 21
22 bool IceTest::SubzeroBitcodeMunger::runTest( 22 bool IceTest::SubzeroBitcodeMunger::runTest(const char *TestName,
23 const char* TestName, const uint64_t Munges[], size_t MungeSize) { 23 const uint64_t Munges[],
24 size_t MungeSize) {
24 const bool AddHeader = true; 25 const bool AddHeader = true;
25 setupTest(TestName, Munges, MungeSize, AddHeader); 26 setupTest(TestName, Munges, MungeSize, AddHeader);
26 27
27 Ice::ClFlags Flags; 28 Ice::ClFlags Flags;
28 Flags.AllowErrorRecovery = true; 29 Flags.AllowErrorRecovery = true;
29 Flags.GenerateUnitTestMessages = true; 30 Flags.GenerateUnitTestMessages = true;
30 Ice::GlobalContext Ctx(DumpStream, DumpStream, nullptr, 31 Ice::GlobalContext Ctx(DumpStream, DumpStream, nullptr,
31 Ice::IceV_Instructions, Ice::Target_X8632, 32 Ice::IceV_Instructions, Ice::Target_X8632, Ice::Opt_m1,
32 Ice::Opt_m1, "", Flags); 33 "", Flags);
33 Ice::PNaClTranslator Translator(&Ctx, Flags); 34 Ice::PNaClTranslator Translator(&Ctx, Flags);
34 Translator.translateBuffer(TestName, MungedInput.get()); 35 Translator.translateBuffer(TestName, MungedInput.get());
35 36
36 cleanupTest(); 37 cleanupTest();
37 return Translator.getErrorStatus().value() == 0; 38 return Translator.getErrorStatus().value() == 0;
38 } 39 }
39 40
40 } // end of namespace IceTest 41 } // end of namespace IceTest
OLDNEW
« no previous file with comments | « unittest/BitcodeMunge.h ('k') | unittest/IceParseInstsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698