1//===-- llvm/Remarks/Remark.h - The remark type -----------------*- C++/-*-===// 
  3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 
  4// See https://llvm.org/LICENSE.txt for license information. 
  5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 
  7//===----------------------------------------------------------------------===// 
  9// This file defines an abstraction for handling remarks. 
  11//===----------------------------------------------------------------------===// 
  13#ifndef LLVM_REMARKS_REMARK_H 
  14#define LLVM_REMARKS_REMARK_H 
  28/// The current version of the remark entry. 
  31/// The debug location used to track a remark back to the source file. 
  33 /// Absolute path of the source file corresponding to this remark. 
  38 /// Implement operator<< on RemarkLocation. 
 
  42// Create wrappers for C Binding types (see CBindingWrapping.h). 
  45/// A key-value pair with a debug location that is used to display the remarks 
  46/// at the right place in the source. 
  49 // FIXME: We might want to be able to store other types than strings here. 
  51 // If set, the debug location corresponding to the value. 
  52  std::optional<RemarkLocation> 
Loc;
 
  57 /// Implement operator<< on Argument. 
  60 /// Return the value of argument as an integer of type T. 
  65 if (Str.consumeInteger<
T>(Radix, Res) || !Str.empty())
 
 
 
  71// Create wrappers for C Binding types (see CBindingWrapping.h). 
  74/// The type of the remark. 
  98 return "AnalysisFPCommute";
 
  100 return "AnalysisAliasing";
 
 
  106/// A remark type used for both emission and parsing. 
  108 /// The type of the remark. 
  111 /// Name of the pass that triggers the emission of this remark. 
  114 /// Textual identifier for the remark (single-word, camel-case). Can be used 
  115 /// by external tools reading the output file for remarks to identify the 
  119 /// Mangled name of the function that triggers the emssion of this remark. 
  122 /// The location in the source file of the remark. 
  123  std::optional<RemarkLocation> 
Loc;
 
  125 /// If profile information is available, this is the number of times the 
  126 /// corresponding code was executed in a profile instrumentation run. 
  129 /// Arguments collected via the streaming interface. 
  136 /// Return a message composed from the arguments as a string. 
  139 /// Return the first argument with the specified key or nullptr if no such 
  140 /// argument was found. 
  143 /// Clone this remark to explicitly ask for a copy. 
  146 /// Implement operator<< on Remark. 
  150 /// In order to avoid unwanted copies, "delete" the copy constructor. 
  151 /// If a copy is needed, it should be done through `Remark::clone()`. 
 
  156// Create wrappers for C Binding types (see CBindingWrapping.h). 
  159/// Comparison operators for Remark objects and dependent objects. 
  163 // Sorting based on optionals should result in all `None` entries to appear 
  164 // before the valid entries. For example, remarks with no debug location will 
 
  176 return LHS.SourceFilePath == 
RHS.SourceFilePath &&
 
  177 LHS.SourceLine == 
RHS.SourceLine &&
 
  178 LHS.SourceColumn == 
RHS.SourceColumn;
 
 
  186 return std::make_tuple(
LHS.SourceFilePath, 
LHS.SourceLine, 
LHS.SourceColumn) <
 
  187 std::make_tuple(
RHS.SourceFilePath, 
RHS.SourceLine, 
RHS.SourceColumn);
 
 
  199 return std::make_tuple(
LHS.Key, 
LHS.Val, 
LHS.Loc) <
 
  200 std::make_tuple(
RHS.Key, 
RHS.Val, 
RHS.Loc);
 
 
  204 return LHS.RemarkType == 
RHS.RemarkType && 
LHS.PassName == 
RHS.PassName &&
 
  205 LHS.RemarkName == 
RHS.RemarkName &&
 
  206 LHS.FunctionName == 
RHS.FunctionName && 
LHS.Loc == 
RHS.Loc &&
 
 
  215 return std::make_tuple(
LHS.RemarkType, 
LHS.PassName, 
LHS.RemarkName,
 
  217 std::make_tuple(
RHS.RemarkType, 
RHS.PassName, 
RHS.RemarkName,
 
 
  236} 
// end namespace remarks 
  237} 
// end namespace llvm 
  239#endif /* LLVM_REMARKS_REMARK_H */ 
#define DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref)
 
This file defines the SmallVector class.
 
This class represents an incoming formal argument to a Function.
 
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
 
StringRef - Represent a constant reference to a string, i.e.
 
This class implements an extremely fast bulk output stream that can only output to a stream.
 
This is an optimization pass for GlobalISel generic memory operations.
 
Printable print(const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr, unsigned DynamicVGPRBlockSize=0)
 
LLVM_ATTRIBUTE_VISIBILITY_DEFAULT AnalysisKey InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key