Lines Matching full:remark

10 #include "llvm/Remarks/Remark.h"
18 // 1. Parse the YAML remark -> FromYAMLRemark in parseGood()
21 // 4. Compare the remark objects in parseGood()
24 // remark parser and the bitstream remark serializer. It does simplify in parseGood()
33 std::unique_ptr<remarks::Remark> FromYAMLRemark = nullptr; in parseGood()
35 Expected<std::unique_ptr<remarks::Remark>> Remark = Parser.next(); in parseGood() local
36 EXPECT_FALSE(errorToBool(Remark.takeError())); // Check for parsing errors. in parseGood()
37 EXPECT_TRUE(*Remark != nullptr); // At least one remark. in parseGood()
38 // Keep the previous remark around. in parseGood()
39 FromYAMLRemark = std::move(*Remark); in parseGood()
40 Remark = Parser.next(); in parseGood()
41 Error E = Remark.takeError(); in parseGood()
63 std::unique_ptr<remarks::Remark> FromBSRemark = nullptr; in parseGood()
65 Expected<std::unique_ptr<remarks::Remark>> BSRemark = BSParser.next(); in parseGood()
67 EXPECT_TRUE(*BSRemark != nullptr); // At least one remark. in parseGood()
68 // Keep the previous remark around. in parseGood()
117 // Mandatory common part of a remark.
165 Expected<std::unique_ptr<remarks::Remark>> MaybeRemark = Parser.next(); in TEST()
168 EXPECT_TRUE(*MaybeRemark != nullptr); // At least one remark. in TEST()
170 const remarks::Remark &Remark = **MaybeRemark; in TEST() local
171 EXPECT_EQ(Remark.RemarkType, remarks::Type::Missed); in TEST()
172 EXPECT_EQ(checkStr(Remark.PassName, 6), "inline"); in TEST()
173 EXPECT_EQ(checkStr(Remark.RemarkName, 12), "NoDefinition"); in TEST()
174 EXPECT_EQ(checkStr(Remark.FunctionName, 3), "foo"); in TEST()
175 EXPECT_TRUE(Remark.Loc); in TEST()
176 const remarks::RemarkLocation &RL = *Remark.Loc; in TEST()
180 EXPECT_TRUE(Remark.Hotness); in TEST()
181 EXPECT_EQ(*Remark.Hotness, 4U); in TEST()
182 EXPECT_EQ(Remark.Args.size(), 4U); in TEST()
185 for (const remarks::Argument &Arg : Remark.Args) { in TEST()
235 remarks::Remark ToSerializeRemark; in TEST()
268 LLVMRemarkEntryRef Remark = LLVMRemarkParserGetNext(Parser); in TEST() local
269 EXPECT_FALSE(Remark == nullptr); in TEST()
270 EXPECT_EQ(LLVMRemarkEntryGetType(Remark), LLVMRemarkTypeMissed); in TEST()
271 EXPECT_EQ(checkStr(LLVMRemarkEntryGetPassName(Remark), 6), "inline"); in TEST()
272 EXPECT_EQ(checkStr(LLVMRemarkEntryGetRemarkName(Remark), 12), "NoDefinition"); in TEST()
273 EXPECT_EQ(checkStr(LLVMRemarkEntryGetFunctionName(Remark), 3), "foo"); in TEST()
274 LLVMRemarkDebugLocRef DL = LLVMRemarkEntryGetDebugLoc(Remark); in TEST()
278 EXPECT_EQ(LLVMRemarkEntryGetHotness(Remark), 0U); in TEST()
279 EXPECT_EQ(LLVMRemarkEntryGetNumArgs(Remark), 4U); in TEST()
282 LLVMRemarkArgRef Arg = LLVMRemarkEntryGetFirstArg(Remark); in TEST()
315 } while ((Arg = LLVMRemarkEntryGetNextArg(Arg, Remark))); in TEST()
317 LLVMRemarkEntryDispose(Remark); in TEST()
332 Expected<std::unique_ptr<remarks::Remark>> BSRemark = BSParser.next(); in parseBad()
389 // * Error while parsing BLOCK_META: missing remark version.
395 // * Error while parsing BLOCK_REMARK: missing remark type.
396 // * Error while parsing BLOCK_REMARK: unknown remark type.
397 // * Error while parsing BLOCK_REMARK: missing remark name.
398 // * Error while parsing BLOCK_REMARK: missing remark pass.
399 // * Error while parsing BLOCK_REMARK: missing remark function name.
400 // * Error while parsing BLOCK_REMARK: missing key in remark argument.
401 // * Error while parsing BLOCK_REMARK: missing value in remark argument.