OLD | NEW |
---|---|
(Empty) | |
1 //===- llvm/unittest/Bitcode/NaClMungeUtils.h - Test munging utils --------===// | |
jvoung (off chromium)
2015/05/14 22:58:39
NaClMungeUtils.h
->
NaClMungeTest.h
Karl
2015/05/18 16:02:38
Done.
| |
2 // | |
3 // The LLVM Compiler Infrastructure | |
4 // | |
5 // This file is distributed under the University of Illinois Open Source | |
6 // License. See LICENSE.TXT for details. | |
7 // | |
8 //===----------------------------------------------------------------------===// | |
9 | |
10 // Contains common utilities used in bitcode munge tests. | |
11 | |
12 #ifndef LLVM_UNITTEST_BITCODE_NACLMUNGEUTILS_H | |
jvoung (off chromium)
2015/05/14 22:58:39
NACLMUNGEUTILS
->
NACLMUNGETEST
Karl
2015/05/18 16:02:38
Done.
| |
13 #define LLVM_UNITTEST_BITCODE_NACLMUNGEUTILS_H | |
14 | |
15 #include "llvm/ADT/STLExtras.h" | |
16 #include "llvm/Bitcode/NaCl/NaClBitcodeMunge.h" | |
17 | |
18 #include "gtest/gtest.h" | |
19 | |
20 namespace naclmungetest { | |
21 | |
22 const uint64_t Terminator = 0x5768798008978675LL; | |
23 | |
24 #define ARRAY(name) name, array_lengthof(name) | |
25 | |
26 #define ARRAY_TERM(name) ARRAY(name), Terminator | |
27 | |
28 inline std::string stringify(llvm::NaClMungedBitcode &MungedBitcode) { | |
29 std::string Buffer; | |
30 llvm::raw_string_ostream StrBuf(Buffer); | |
31 MungedBitcode.print(StrBuf); | |
32 return StrBuf.str(); | |
33 } | |
34 | |
35 inline std::string stringify(llvm::NaClBitcodeMunger &Munger) { | |
36 return stringify(Munger.getMungedBitcode()); | |
37 } | |
38 | |
39 } // end of namespace naclmungetest | |
40 | |
41 #endif // end LLVM_UNITTEST_BITCODE_NACLMUNGEUTILS_H | |
jvoung (off chromium)
2015/05/14 22:58:39
same
Karl
2015/05/18 16:02:38
Done.
| |
OLD | NEW |